etten / sandbox
The sandbox is a pre-packaged Nette Framework project, basic configured structure for your application.
Requires
- php: ^7.0
- etten/app: ^3.0
- etten/deployment: ^3.1
- etten/doctrine: ^4.7
- etten/migrations: ^3.2
- etten/symfony-events: ^1.1
- etten/utils: ^0.2
- kdyby/console: ^2.7
- kdyby/doctrine: ^3.3
- kdyby/events: ^3.1
- latte/latte: ~2.4.7
- nette/application: ~2.4.9
- nette/bootstrap: ~2.4.5
- nette/caching: ~2.5.6
- nette/di: ~2.4.9
- nette/finder: ~2.4.1
- nette/forms: ~2.4.6
- nette/http: ~2.4.7
- nette/mail: ~2.4.4
- nette/robot-loader: ~2.4.4
- nette/safe-stream: ^2.3
- nette/security: ~2.4.2
- nette/utils: ~2.5.1
- tracy/tracy: ~2.4.9
Requires (Dev)
- etten/codestyle: ^2.0
- phpunit/phpunit: ^6.5
- squizlabs/php_codesniffer: ~2.6.2
- dev-master
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.1
- v3.0.0
- v2.9.4
- v2.9.3
- v2.9.2
- v2.9.1
- v2.9.0
- v2.8.5
- v2.8.4
- v2.8.3
- v2.8.2
- v2.8.1
- v2.8.0
- v2.7.2
- v2.7.1
- v2.7.0
- v2.6.1
- v2.6.0
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.0
- v2.0.1
- v2.0.0
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- dev-https-off
This package is auto-updated.
Last update: 2024-11-11 14:24:51 UTC
README
Based on official nette/sandbox.
Sandbox is a pre-packaged and pre-configured Nette Framework application that you can use as the skeleton for your new applications.
Nette is a popular tool for PHP web development. It is designed to be the most usable and friendliest as possible. It focuses on security and performance and is definitely one of the safest PHP frameworks.
Requirements
Installing
The best way to install Sandbox is using Composer.
When you have Composer installed, run these commands and follow instructions:
composer create-project etten/sandbox my-app
cd my-app
php install.php
Run grunt-contrib-watch
tasks (for automatic LESS, TypeScript compiling):
grunt watch
This can be done automatically by IDE - WebStorm, PHPStorm, see guide.
Create/update database schema:
php web/index.php orm:schema-tool:update
Create a User (username and password):
php web/index.php user:create
Navigate your browser to the www
directory and you will see a welcome page.
PHP 5.4 allows you run php -S localhost:8888 -t www
to start the web server and
then visit http://localhost:8888
in your browser.
You can log-in as created user via http://localhost:8888/admin/sign/in
.
Security warning
It is CRITICAL that all files and directories except www
are NOT accessible
directly via a web browser! Necessary file for Apache is included (.htaccess
).
Make sure that is handled properly by your server!
Included packages
Study them for deeper understanding.
- Nette framework
- Etten\App
- Etten\Migrations
- Etten\Codestyle
- Etten\Deployment
- Etten\SymfonyEvents
- Etten\Doctrine
- Kdyby\Console
- Kdyby\Events
- Kdyby\Doctrine
CLI usage
Application has built-in CLI support.
It's realized via Kdyby\Console (Nette Extension of Symfony\Console).
For list of each commands and options just run CLI:
php web/index.php -h
Via CLI you can for example:
- clean application caches (including Nette\DI and Latte)
- work with Doctrine DBAL and ORM
- run migrations
- deploy application (it should be launched by CI/CD service)
If you use PhpStorm IDE, you can operate with its built-in CLI tool.
It's very simple and you get autocomplete suggestions for all commands and their options!
Just go to Settings - Tools - Command Line Tool Support
, add new Tool Based on Symfony Console
and select
path to web/index.php
of the application. You don't need remember all the commands now.
For more information see Symfony2 Command Line Tool Integration, Command Line Tools Based on Symfony Console (Doctrine, Laravel) in PhpStorm.
Docker
You can use included Docker environment.
Just adjust docker-compose.yml
according your needs.
Then run docker-compose up
. You'll reach the application via http://localhost:8080/
.
If you want to run some PHP commands, login into PHP container as a non-root user:
# Login into Docker PHP terminal as a non-root user
docker exec -it -u me $(basename `pwd`)_php_1 bash