codecasts / codecasts
CODECASTS Application
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 200
Watchers: 29
Forks: 44
Open Issues: 14
Type:project
Requires
- php: >=5.6.4
- adamwathan/eloquent-oauth-l5: ^0.5.1
- artesaos/migrator: ^1.0
- artesaos/seotools: ^0.9.2
- artesaos/warehouse: 2.x-dev
- barryvdh/laravel-debugbar: ^2.2
- codecasts/flysystem-aws-s3-v3: ^1.0
- elasticsearch/elasticsearch: ^2.2
- guzzlehttp/guzzle: ~5.3|~6.0
- iugu/iugu: ^1.0
- laravel/framework: 5.3.*
- laravelcollective/html: ^5.2
- league/fractal: ^0.13.0
- maknz/slack: ^1.7
- mashape/unirest-php: ^3.0
- predis/predis: ^1.1
- sentry/sentry-laravel: ^0.3.0
- vinkla/vimeo: ^3.3
Requires (Dev)
- doctrine/dbal: ^2.5
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~5.0
- symfony/css-selector: 3.1.*
- symfony/dom-crawler: 3.1.*
This package is auto-updated.
Last update: 2024-11-25 04:21:13 UTC
README
Application's GIT Repository. This document should be the ultimate guide on running and specs about the application source code.
Build status
Index
Development
For using the docker version (recommended) of the environment, you first need to stop local services like MySQL, Redis, Elasticsearch and webservers running on port 80.
Requirements
- Docker >= 1.10.3.
- docker-compose, if not already bundled in your docker install.
- A virtual host named codecasts.app pointing to 127.0.0.1, this step is needed since the social login callbacks are using this URL.
Operating the docker environment
Starting services
- Option 1: Keeping the output visible on the terminal
docker-compose up
- Option 2 : Sending the output of the services to background
docker-compose up -d
Stopping services
-
Option 1: When the output is visible (started with option 1), just hit
control + c
to stop it. -
Option 2: When the services are on background or failed to stop with
control + c
, you can stop them with the following command:
docker-compose down
Running internal commands
When commands like artisan are needed, those commands would need to run inside the docker containers, to do so, use the following sintax:
docker-compose run {service-name} {command-you-want-to-run}
For example. to run migrations, you can do:
docker-compose run app php artisan migrate
Another example, starting a terminal inside the MySQL service
docker-compose run mysql /bin/bash
List of Services
The service names can be located inside the docker-compose.yml
file, right now, the following are enabled:
Coding Guide Lines
Style
PSR-1 & PSR-2 should be enforced, a copy of php-cd-fixer is distributed along with the PHP Docker image, so the following command can automatically format the code before commiting:
docker-compose run app php-cs-fixer --diff --fixers=-psr1,-psr2 fix app
As a alternative, you can alias that command as psr2
or other name:
# Bash and ZSH alias psr2="docker-compose run app php-cs-fixer --diff --fixers=-psr1,-psr2 fix" # Fish shell alias psr2 "docker-compose run app php-cs-fixer --diff --fixers=-psr1,-psr2 fix"
Unit Testing
Following the same structure of existing tests, the main rule it keep tests under the same namespace as the class being tested, in order to avoid useless imports and keep code cleaner
Code coverage as HTML is already ignored on git when generated on the coverage
directory, to run tests with coverage reports, use
php vendor/bin/phpunit --coverage-html=coverage