API to manage users and interactions between them in games.
http://battleships-api.dev.lekowski.pl/doc
- https://github.com/jlekowski/battleships-webclient - web client for the API
- https://github.com/jlekowski/battleships-apiclient - PHP client for the API
- https://github.com/jlekowski/battleships-offline - offline version
- https://github.com/jlekowski/battleships-vagrant - vagrant setup for Battleships testing and development
- https://github.com/jlekowski/battleships - legacy full web version
- Download and unzip or clone.
- Setup the stack (web server, database etc.) - SETUP.
- Change Symfony environment to production, install dependencies, and provide parameters.
export SYMFONY_ENV=prod
composer install --optimize-autoloader --no-dev --apcu-autoloader
bin/console cache:clear --env=prod --no-debug --no-warmup
bin/console doctrine:schema:validate
bin/console doctrine:schema:update --force
- You may need to add privileges to var folder (http://symfony.com/doc/current/book/installation.html).
HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var
- Install dev dependencies.
composer install
- Run unit tests.
bin/phpunit
- You can run E2E tests (see https://github.com/jlekowski/battleships-apiclient)
-
version 1.5
- Upgraded to PHP 7.1 (composer.lock -
composer update --ignore-platform-reqs
on 7.0 still works) - Upgraded to Symfony 3.3 and all bundles and dependencies
- Replaced env variables
SYMFONY__*
withBATTLESHIPS_*
as deprecated in Symfony 3.3 - Renamed game fields
user_id1|2
touser1|2_id
- Added cache clearers (opcache, varnish, apc) run on Symfony
cache:clear
command - Added phpstan to travis build
- Upgraded to PHP 7.1 (composer.lock -
-
version 1.4
- Added tests to reach 100% code coverage
- Added Codecov support
- Upgraded dependencies and support for PHP 7.2
- Added
step
option toUserTokenBreakCommand
- Added support for
SYMFONY__VAR_DIR
andSYMFONY__DEV_ENABLED
env variables (see battleships-vagrant repository) - Changed cache tags format for game events
-
version 1.3
- Dropped support for PHP 5.* version
- Added ApiDoc under
/doc
(see http://battleships-api.dev.lekowski.pl/doc)
-
version 1.2
- Fixed critical bug in sorting when setting some ships with mast in column 10
- Small changes for build/analysis tools (PSR4 declaration, no 5.5 support)
-
version 1.1
- Changed the way coordinates are handled
- Moved E2E to battleships-apiclient repo
- Updated dependencies
- Cleaning and refactoring
-
version 1.0
- Working version of the API deployed
- Still many TODOs, but they should not affect the stability and will be fixed on an ongoing basis