Homepage with ZF2 and Doctrine2
Private homepage to provide informations about: Practices, principles and patterns in web-development with PHP
- Skeleton with twitter-Bootstrap
- Responsive Frontend
- Contact
- ContentManager
- Blog: Postlist is infinitive
- ErrorLogging
- GoogleTracking Plugin
- Automail for new contact entry
- Config Cache
- Asset Versioning
- Output cache
cd /var/www
git clone https://github.com/mamuz/mm-web.git
cd mm-web
curl -s https://getcomposer.org/installer
php composer.phar self-update; php composer.phar install
Add virtual host to apache
<VirtualHost *:80>
DocumentRoot /var/www/mm-web/public
ServerName local.mm-web.de
<Location />
RewriteEngine On
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [NC,L]
RewriteRule ^ /index.php [NC,L]
</Location>
<Directory "/var/www/mm-web/public">
DirectoryIndex index.php
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Add servername local.mm-web.de
to host file and restart apache server.
Create directories for temporary data
sh ./scripts/mkdata.sh
In ./environment.php
is an APPLICATION_ENV defined to development
.
For other environments change it to staging
or production
.
putenv("APPLICATION_ENV=development");
Dependencies are handled by Composer package manager.
php composer.phar self-update; php composer.phar install
In test directory an over all module tesrunner exists.
Be sure that each module is defined in ./test/config.php
and in ./test/phpunit.xml
.
Each module must have an autoloader classmap.
./vendor/bin/phpunit -c test/
Each module should have an autoloader classmap and a template map.
sh ./scripts/generate_maps.sh
In ./config/application.config
define which modules will be integrated and the config cache behavior.
See README.md in Application module for more informations.
See README.md in scripts directory for more informations.