Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed 'ezpublish' to 'app' #70

Merged
merged 11 commits into from Dec 1, 2015
Merged
11 changes: 4 additions & 7 deletions .gitignore
Expand Up @@ -4,14 +4,11 @@
/.idea/
/bin/behat
/bin/phpunit
/ezpublish/cache/
/ezpublish/logs/
/app/cache/
/app/logs/
/ezpublish_legacy
/ezpublish/config/parameters.yml
/ezpublish/config/ezpublish_prod.yml
/ezpublish/config/ezpublish_dev.yml
/ezpublish/sessions
/ezpublish/bootstrap.php.cache
/app/config/parameters.yml
/app/bootstrap.php.cache
/web/index_treemenu.php
/web/index_rest.php
/web/index_cluster.php
Expand Down
2 changes: 1 addition & 1 deletion .php_cs
Expand Up @@ -22,7 +22,7 @@ return Symfony\CS\Config\Config::create()
'bin/.ci',
'bin/.travis',
'doc',
'ezpublish/cache',
'app/cache',
'ezpublish_legacy',
])
)
Expand Down
2 changes: 1 addition & 1 deletion GETTING_STARTED.md
Expand Up @@ -35,7 +35,7 @@ eZ Platform comes with [SensioGeneratorBundle](http://symfony.com/doc/current/bu
This bundle provides useful commands, including one to easily generate a new bundle from command line:

```bash
php ezpublish/console generate:bundle
php app/console generate:bundle
```

Please note that `yml` is the preferred format for configuration.
Expand Down
50 changes: 30 additions & 20 deletions INSTALL.md
Expand Up @@ -21,7 +21,7 @@
1. **Install/Extract eZ Platform**<a name="install-1-extract"></a>:

There are two ways to install eZ Platform described below, what is common is that you should make sure
relevant settings are generated into `ezpublish/config/parameters.yml` as a result of this step.
relevant settings are generated into `app/config/parameters.yml` as a result of this step.

`parameters.yml` contains settings for your database, mail system, and optionally [Solr](http://lucene.apache.org/solr/)
if `search_engine` is configured as `solr`, as opposed to default `legacy` *(a limited database powered search engine)*.
Expand Down Expand Up @@ -61,59 +61,69 @@

2. *Only for *NIX users* **Setup folder rights**<a name="install-2-folder-rights"></a>:

One common issue is that the `ezpublish/cache`, `ezpublish/logs` and `ezpublish/config` directories **must be writable both by the web server and the command line user**.
If your web server user is different from your command line user, you can run the following commands just once in your project to ensure that permissions will be set up properly.
Like most things, [Symfony documentation](http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup)
applies here, meaning `app/cache` and `app/logs` need to be writable by cli and web server user. Furthermore, future
files and directories created by these two users will need to inherit those access rights. *For security reasons,
there is no need for web server to have access to write to other directories.*

Change `www-data` to your web server user:

A. **Using ACL on a system that supports chmod +a**
A. **Using ACL on a *Linux/BSD* system that supports chmod +a**

```bash
$ rm -rf ezpublish/cache/* ezpublish/logs/* ezpublish/sessions/*
$ rm -rf app/cache/* app/logs/*
$ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" \
ezpublish/{cache,logs,config,sessions} web
app/cache app/logs web
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" \
ezpublish/{cache,logs,config,sessions} web
app/cache app/logs web
```

B. **Using ACL on a system that does not support chmod +a**
B. **Using ACL on a *Linux/BSD* system that does not support chmod +a**

Some systems don't support chmod +a, but do support another utility called setfacl. You may need to enable ACL support on your partition and install setfacl before using it (as is the case with Ubuntu), like so:

```bash
$ sudo setfacl -R -m u:www-data:rwx -m u:www-data:rwx \
ezpublish/{cache,logs,config,sessions} web
$ sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx \
app/cache app/logs web
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx \
ezpublish/{cache,logs,config,sessions} web
app/cache app/logs web
```

C. **Using chown on systems that don't support ACL**
C. **Using chown on *Linux/BSD/OS X* systems that don't support ACL**

Some systems don't support ACL at all. You will need to set your web server's user as the owner of the required directories.

```bash
$ sudo chown -R www-data:www-data ezpublish/{cache,logs,config,sessions} web
$ sudo find {ezpublish/{cache,logs,config,sessions},web} -type d | xargs sudo chmod -R 775
$ sudo find {ezpublish/{cache,logs,config},web} -type f | xargs sudo chmod -R 664
$ sudo chown -R www-data:www-data app/cache app/logs web
$ sudo find {app/{cache,logs},web} -type d | xargs sudo chmod -R 775
$ sudo find {app/{cache,logs},web} -type f | xargs sudo chmod -R 664
```

D. **Using chmod**
D. **Using chmod on a *Linux/BSD/OS X* system where you can't change owner**

If you can't use ACL and aren't allowed to change owner, you can use chmod, making the files writable by everybody. Note that this method really isn't recommended as it allows any user to do anything.

```bash
$ sudo find {ezpublish/{cache,logs,config,sessions},web} -type d | xargs sudo chmod -R 777
$ sudo find {ezpublish/{cache,logs,config,sessions},web} -type f | xargs sudo chmod -R 666
$ sudo find {app/{cache,logs},web} -type d | xargs sudo chmod -R 777
$ sudo find {app/{cache,logs},web} -type f | xargs sudo chmod -R 666
```

When using chmod, note that newly created files (such as cache) owned by the web server's user may have different/restrictive permissions.
In this case, it may be required to change the umask so that the cache and log directories will be group-writable or world-writable (`umask(0002)` or `umask(0000)` respectively).

It may also possible to add the group ownership inheritance flag so new files inherit the current group, and use `775`/`664` in the command lines above instead of world-writable:
```bash
$ sudo chmod g+s {ezpublish/{cache,logs,config,sessions},web}
$ sudo chmod g+s {app/{cache,logs},web}
```

E. **Setup folder rights on Windows**

For your choice of web server you'll need to make sure web server user has read access to `<root-dir>`, and
write access to the following directories:
- app/cache
- app/logs


3. **Configure a VirtualHost**<a name="install-3-vhost"></a>:

A virtual host setup is the recommended, most secure setup of eZ Publish.
Expand All @@ -125,7 +135,7 @@
You may now complete the eZ Platform installation with ezplatform:install command, example of use:

```bash
$ php -d memory_limit=-1 ezpublish/console ezplatform:install --env prod clean
$ php -d memory_limit=-1 app/console ezplatform:install --env prod clean
```

**Note**: Password for the generated `admin` user is `publish`, this name and password is needed when you would like to login to backend Platform UI. Future versions will prompt you for a unique password during installation.
Expand Down
8 changes: 4 additions & 4 deletions ezpublish/EzPublishCache.php → app/AppCache.php
@@ -1,6 +1,6 @@
<?php
/**
* File containing the EzPublishCache class.
* File containing the AppCache class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
Expand All @@ -9,11 +9,11 @@
use eZ\Bundle\EzPublishCoreBundle\HttpCache;

/**
* Class EzPublishCache.
* Class AppCache.
*
* For easier upgrade do not change this file, as of 2015.01 possible to extend
* cleanly via HTTP_CACHE_CLASS & CUSTOM_CLASSLOADER_FILE env variables!
* cleanly via SYMFONY_HTTP_CACHE_CLASS & SYMFONY_CLASSLOADER_FILE env variables!
*/
class EzPublishCache extends HttpCache
class AppCache extends HttpCache
{
}
2 changes: 1 addition & 1 deletion ezpublish/EzPublishKernel.php → app/AppKernel.php
Expand Up @@ -9,7 +9,7 @@
use eZ\Bundle\EzPublishCoreBundle\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class EzPublishKernel extends Kernel
class AppKernel extends Kernel
{
/**
* Returns an array of bundles to registers.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions ezpublish/config/config.yml → app/config/config.yml
Expand Up @@ -3,7 +3,7 @@ imports:
- { resource: parameters.yml }
- { resource: security.yml }

# Configuration for Database connection, can have several connections used by eZ Repositories in ezpublish.yml
# Configuration for Database connection, can have several connections used by eZ Repositories in ezplatform.yml
doctrine:
dbal:
connections:
Expand All @@ -17,7 +17,7 @@ doctrine:
charset: UTF8

# Base configuration for Solr, for more options see: https://doc.ez.no/display/EZP/Solr+Search+Engine+Bundle
# Can have several connections used by each eZ Repositories in ezpublish.yml
# Can have several connections used by each eZ Repositories in ezplatform.yml
ez_search_engine_solr:
endpoints:
endpoint0:
Expand All @@ -31,7 +31,7 @@ ez_search_engine_solr:
default: endpoint0

# Stash is used for persistence cache in eZ Repository
# Can have several caches used by different eZ Repositories in ezpublish.yml, must be one per database
# Can have several caches used by different eZ Repositories in ezplatform.yml, must be one per database
stash:
caches:
default:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ezpublish/console → app/console
Expand Up @@ -9,7 +9,7 @@ set_time_limit(0);

// Use autoload over boostrap here so we don't need to keep the generated files in git
require_once __DIR__ . '/autoload.php';
require_once __DIR__ . '/EzPublishKernel.php';
require_once __DIR__ . '/AppKernel.php';

use eZ\Bundle\EzPublishCoreBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
Expand All @@ -22,5 +22,5 @@ if ($debug) {
Debug::enable();
}

$application = new Application(new EzPublishKernel($env, $debug));
$application = new Application(new AppKernel($env, $debug));
$application->run($input);
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions behat.yml.dist
Expand Up @@ -11,15 +11,15 @@ default:

Behat\Symfony2Extension:
kernel:
bootstrap: ezpublish/autoload.php
path: ezpublish/EzPublishKernel.php
class: EzPublishKernel
bootstrap: app/autoload.php
path: app/AppKernel.php
class: AppKernel
env: behat
debug: false

jarnaiz\JUnitFormatter\JUnitFormatterExtension:
filename: report.xml
outputDir: %paths.base%/ezpublish/logs/junit
outputDir: %paths.base%/app/logs/junit

# default profile: no suites
suites: ~
Expand Down
6 changes: 3 additions & 3 deletions bin/.ci/prepare_archive.sh
Expand Up @@ -13,12 +13,12 @@ composer install -n --prefer-dist --no-dev --no-scripts
mv .gitignore .gitignore.dist

# Archive: Remove cache (wrong paths), logs (generated by composer call above) & zeta tests (too big)
rm -Rf ezpublish/cache/*/* ezpublish/logs/* vendor/zetacomponents/*/tests
rm -Rf app/cache/*/* app/logs/* vendor/zetacomponents/*/tests

echo << EOF
Ready to archive the result

Assuming current folder is build/ezpublish5 this can be accomplished in the following way:
Assuming current folder is build/ezplatform this can be accomplished in the following way:
cd ../..
tar czf dist/ezpublish5-\$version-ee-gpl-full.tar.gz --directory=build ezpublish5
tar czf dist/ezplatform-\$version-ee-gpl-full.tar.gz --directory=build ezplatform
EOF
2 changes: 1 addition & 1 deletion bin/.travis/ezrouter.php
Expand Up @@ -5,5 +5,5 @@
* @version //autogentag//
*/

putenv( "ENVIRONMENT=behat" );
putenv( "SYMFONY_ENV=behat" );
require __DIR__ . "/../ezrouter.php";
10 changes: 5 additions & 5 deletions bin/.travis/prepare_ezpublish.sh
Expand Up @@ -9,11 +9,11 @@ echo "> Setup github auth key to not reach api limit"
./bin/.travis/install_composer_github_key.sh

echo "> Set folder permissions"
sudo find {ezpublish/{cache,logs,config,sessions},web} -type d | sudo xargs chmod -R 777
sudo find {ezpublish/{cache,logs,config,sessions},web} -type f | sudo xargs chmod -R 666
sudo find {app/{cache,logs},web} -type d | sudo xargs chmod -R 777
sudo find {app/{cache,logs},web} -type f | sudo xargs chmod -R 666

echo "> Copy behat specific parameters.yml settings"
cp bin/.travis/parameters.yml ezpublish/config/
cp bin/.travis/parameters.yml app/config/

# Switch to another Symfony version if asked for
if [ "$SYMFONY_VERSION" != "" ] ; then composer require --no-update symfony/symfony="$SYMFONY_VERSION" ; fi;
Expand All @@ -22,10 +22,10 @@ echo "> Install dependencies through composer"
composer install --no-progress --no-interaction

echo "> Run assetic dump for behat env"
php ezpublish/console --env=behat --no-debug assetic:dump
php app/console --env=behat --no-debug assetic:dump

echo "> Installing ezplatform clean"
php ezpublish/console --env=behat ezplatform:install clean
php app/console --env=behat ezplatform:install clean

echo "> Warm up cache, using curl to make sure everything is warmed up, incl class, http & spi cache"
curl -sSLI "http://localhost"
2 changes: 1 addition & 1 deletion bin/.travis/prepare_system.sh
Expand Up @@ -9,7 +9,7 @@
## https://github.com/facebook/hiphop-php/commit/0b2dfdf4492eb06a125b068e939d092ec0588e5c

# Disable xdebug to speed things up
if [[ "$USE_DEBUGGING" == "" && "$TRAVIS_PHP_VERSION" != "" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then
if [[ "$SYMFONY_DEBUG" == "" && "$TRAVIS_PHP_VERSION" != "" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then
echo "> Disable xdebug";
phpenv config-rm xdebug.ini ;
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/ezrouter.php
Expand Up @@ -20,7 +20,7 @@
From your command line, type :

$ cd /path/to/ezpublish5/folder
$ php ezpublish/console server:run -r ../bin/ezrouter.php localhost:8000
$ php app/console server:run -r ../bin/ezrouter.php localhost:8000

This will start PHP webserver for localhost on port 8000.
You can of course replace localhost by another host. Port is also customizable.
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Expand Up @@ -77,15 +77,14 @@
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "ezpublish",
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"ezpublish-legacy-dir": "ezpublish_legacy",
"___ezpublish-asset-dump-env": "To set environment used by dumpAssets script, like 'prod', or 'none' to skip",
"ezpublish-asset-dump-env": "",
"___symfony-assets-install": "One of 'symlink', 'relative' (symlinks) or 'hard'",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "ezpublish/config/parameters.yml"
"file": "app/config/parameters.yml"
}
}
}
2 changes: 1 addition & 1 deletion doc/apache2/Readme.md
Expand Up @@ -17,7 +17,7 @@ Configuration
- Edit it and adapt the configuration to suit your needs
-- Make sure to replace all `%VARIABLES%`, further description below
-- For cluster setup, enable custom rewrite rules for it found inline in the vhost.template
-- In 5.2 and higher you can optionally configure the eZ Platform front controller (`index.php`) using environment variables documented inline in the vhost template.
-- In 5.2 and higher you can optionally configure the eZ Platform front controller (`app.php`) using environment variables documented inline in the vhost template.
-- Adapt the ´<Directory>´ section for your Apache version
- Create a symlink of /etc/apache2/sites-available/yoursite.com into /etc/apache2/sites-enabled/yoursite.com
- restart Apache
Expand Down