Skip to content

Commit

Permalink
current state, added several dependencies, changed dir structure, ...
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectricMaxxx committed Feb 23, 2018
1 parent d014fa8 commit 14ea0ec
Show file tree
Hide file tree
Showing 111 changed files with 4,212 additions and 3,778 deletions.
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=9d27ae2fee5cdce7eb45d7aba490cfcb
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com
###< symfony/framework-bundle ###
10 changes: 10 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=9d27ae2fee5cdce7eb45d7aba490cfcb
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com
###< symfony/framework-bundle ###
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/app/config/parameters.yml
/config/packages/parameters.yml
/build/
/phpunit.xml
/var/*
Expand All @@ -13,9 +13,13 @@
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
/public/bundles/

/app/config/phpcr.yml
/config/packages/phpcr.yml
/jackrabbit/
/jackrabbit-standalone-*.jar
/vagrant/.vagrant

###> symfony/web-server-bundle ###
.web-server-pid
###< symfony/web-server-bundle ###
7 changes: 3 additions & 4 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ build:
# The configuration of app when it is exposed to the web.
web:
# The public directory of the app, relative to its root.
document_root: "/web"
document_root: "/public"
# The front-controller script to send non-static requests to.
passthru: "/app.php"
passthru: "/index.php"
whitelist:
# slides
- ^/slides/.*\.html$
Expand Down Expand Up @@ -58,9 +58,8 @@ mounts:
# The hooks that will be performed when the package is deployed.
hooks:
build: |
rm web/app_dev.php
# place sqlite file into /tmp so that we can write to it during deploy
sed -i 's@%kernel.root_dir%/../var/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
sed -i 's@%kernel.project_dir%/var/app.sqlite@/tmp/app.sqlite@' app/config/parameters.yml
bin/console --env=prod assets:install -n --no-debug
bin/console --env=prod assetic:dump -n --no-debug
deploy: ./bin/reloadFixtures.sh $PWD true
Expand Down
12 changes: 4 additions & 8 deletions .sensiolabs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@

global_exclude_dirs:
- vendor
- web
- app/tests
- public
- tests
- vagrant
- bin

pre_composer_script: |
#!/bin/bash
cp app/config/parameters.yml.dist app/config/parameters.yml
cp app/config/phpcr_doctrine_dbal.yml.dist app/config/phpcr.yml
cp config/fixtures/parameters.yml.dist config/packages/parameters.yml
cp config/fixtures/phpcr_doctrine_dbal.yml.dist config/packages/phpcr.yml
exclude_patterns:
- app/autoload.php
- app/check.php
- app/SymfonyRequirements.php
rules:
symfony.web_config_should_not_be_present:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can run the sandbox on your system, or in a virtualbox VM using Vagrant. For

### You will need:

* PHP 5.3.9+ (with intl extension)
* PHP 7.1+ (with intl extension)
* PHPUnit 3.6+ (optional)
* Composer

Expand All @@ -43,11 +43,11 @@ implementation.
Once you have that, copy the default jackalope-jackrabbit configuration file,
adjust it as needed and install the dependencies with composer:

cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml
cp config/fixtures/phpcr_jackrabbit.yml.dist config/packages/phpcr.yml

The last command will fetch the main project and all its dependencies (CMF
Bundles, Symfony, Doctrine\PHPCR, Jackalope ... ). You might want to have a look
at the ``app/config/parameters.yml`` and adjust as needed.
at the ``config/packages/phpcr.yml`` and adjust as needed.

### Install the Doctrine DBAL provider (optional)

Expand All @@ -56,7 +56,7 @@ files and create the database accordingly. If you have the PHP sqlite extension
available, this is the simplest to quickly try out the CMF. Copy the file
and then install the dependencies:

cp app/config/phpcr_doctrine_dbal.yml.dist app/config/phpcr.yml
cp config/fixtures/phpcr_doctrine_dbal.yml.dist config/packages/phpcr.yml

The Doctrine DBAL implementation is installed by default already along side the Jackrabbit implementation.

Expand Down Expand Up @@ -110,7 +110,7 @@ Create an apache virtual host entry along the lines of:

<Virtualhost *:80>
Servername cmf.lo
DocumentRoot /path/to/symfony-cmf/cmf-sandbox/web
DocumentRoot /path/to/symfony-cmf/cmf-sandbox/public
<Directory /path/to/symfony-cmf/cmf-sandbox>
AllowOverride All
</Directory>
Expand Down
1 change: 0 additions & 1 deletion app/.htaccess

This file was deleted.

18 changes: 0 additions & 18 deletions app/AppCache.php

This file was deleted.

108 changes: 0 additions & 108 deletions app/AppKernel.php

This file was deleted.

22 changes: 0 additions & 22 deletions app/autoload.php

This file was deleted.

22 changes: 0 additions & 22 deletions app/config/services.yml

This file was deleted.

34 changes: 22 additions & 12 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
#!/usr/bin/env php
<?php

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;

// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000);
use Symfony\Component\Dotenv\Dotenv;

set_time_limit(0);

/**
* @var Composer\Autoload\ClassLoader $loader
*/
$loader = require __DIR__.'/../app/autoload.php';
require __DIR__.'/../vendor/autoload.php';

if (!class_exists(Application::class)) {
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}

if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../.env');
}

$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
$debug = ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);

if ($debug) {
Debug::enable();
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}

$kernel = new AppKernel($env, $debug);
$kernel = new Kernel($env, $debug);
$application = new Application($kernel);
$application->run($input);
Loading

0 comments on commit 14ea0ec

Please sign in to comment.