Skip to content

Commit

Permalink
Merge remote-tracking branch 'forkcms/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
StijnVrolijk committed Jan 26, 2018
2 parents a0a9dd8 + 29fbf67 commit 5bc1162
Show file tree
Hide file tree
Showing 1,562 changed files with 24,485 additions and 38,137 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.js]
indent_size = 2

[*.{html,rb,tpl,twig,xml}]
charset = utf-8
end_of_line = lf
Expand Down
8 changes: 8 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Use this file to set your environment variables for Docker

# XDebug variables
# Configure the IP of your hostmachine, or use the special Mac-only DNS name which will resolve to the internal IP of the host.
DOCKER_HOST_IP=docker.for.mac.localhost
PHP_IDE_CONFIG=serverName=localhost
XDEBUG_IDEKEY=PHPSTORM
XDEBUG_PORT=9000
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@

# Docker
var/docker/db/data/*
.env
3 changes: 2 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ deny from env=stayout
RewriteRule var/logs - [F]
RewriteRule app/config - [F]
RewriteRule src/Frontend/Cache/CompiledTemplates - [F]
RewriteRule src/Frontend/Cache/Search - [F]
RewriteRule src/Backend/Cache/CompiledTemplates - [F]
RewriteRule var/docker/.* - [F]
RewriteRule Dockerfile - [F]
RewriteRule \.dockerignore - [F]
RewriteRule docker-compose\.yml - [F]
RewriteRule docker-compose\.override\.yml - [F]
RewriteRule \.env - [F]
RewriteRule \.env.dist - [F]

# @remark: custom for Sumocoders
RewriteRule .*\.rb - [F]
Expand Down
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ matrix:

script:
- bin/phpcs --standard=psr2 --extensions=php --warning-severity=0 --ignore=src/Backend/Core/Js/ckfinder,src/Backend/Cache,src/Frontend/Cache,src/Backend/Core/Js/ckeditor --report=full "src"
- travis_wait 20 bin/simple-phpunit --coverage-clover=coverage.clover
- travis_wait 30 bin/simple-phpunit --coverage-clover=coverage.clover

before_script:
- npm install -g bower
- composer install
- mysql -e 'create database fork_test'
- mysql -u root fork_test < tests/data/test_db.sql
- cp app/config/parameters.yml.travis app/config/parameters.yml
- mysql -e "SET GLOBAL wait_timeout = 3600" # try to avoid mysql has gone away errors

after_script:
- yarn test

after_success:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Expand Down
67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,70 @@
5.1.0 (2018-01-25)
------------------

Added:
* Core: Added subscriber to make it more simple to configure the meta tab in a symfony form [#2398](https://github.com/forkcms/forkcms/pull/2398)
* Core: CKEditor plugin for media library [#2261](https://github.com/forkcms/forkcms/pull/2261)
* Core: Added ajax UpdateSequence base action to make it more simple to implement those [#2400](https://github.com/forkcms/forkcms/pull/2400)
* Core: Skip rewriting and enabling https on localhost (thank you google…) [#2389](https://github.com/forkcms/forkcms/pull/2389)
* Core: Accessibility improvements [#2287](https://github.com/forkcms/forkcms/pull/2287) [#2351](https://github.com/forkcms/forkcms/pull/2351) [#2338](https://github.com/forkcms/forkcms/pull/2338) [#2320](https://github.com/forkcms/forkcms/pull/2320)
* Core: Enable monolog rotating log file feature [#2346](https://github.com/forkcms/forkcms/pull/2346)
* Core: Added bootstrap 4 validation classes [#2334](https://github.com/forkcms/forkcms/pull/2334)
* Core: Add method to remove the last element from a breadcrumb [#2282](https://github.com/forkcms/forkcms/pull/2282)
* Core: Added standard js [#2212](https://github.com/forkcms/forkcms/pull/2212)
* Core: Added help text to form field template [#2205](https://github.com/forkcms/forkcms/pull/2205)
* Core: Added accessible way to change the order of items in a datagrid [#2229](https://github.com/forkcms/forkcms/pull/2229)
* Location: copy location widgets when copying pages to an other language [#2342](https://github.com/forkcms/forkcms/pull/2342)
* Mailmotor: Add option to have a different list for all languages [#2237](https://github.com/forkcms/forkcms/pull/2237)
* MediaLibrary: Make it possible to count the number of connected items so we can use contraints on them [#2243](https://github.com/forkcms/forkcms/pull/2243)
* Pages: Add HREFLang dropdowns in seo tab [#2298](https://github.com/forkcms/forkcms/pull/2298)
* Pages: Make it possible to change the page order in the page settings form [#2230](https://github.com/forkcms/forkcms/pull/2230)
* Search: Added short term search for terms of less than 3 chars [#2327](https://github.com/forkcms/forkcms/pull/2327)

Changed:
* Core: Upgraded symfony to 3.4 and updated the outdated composer packages [#2406](https://github.com/forkcms/forkcms/pull/2406)
* Core: Load ckeditor with yarn [#2314](https://github.com/forkcms/forkcms/pull/2314)
* Blog: Extend core templates instead of overwriting them [#2312](https://github.com/forkcms/forkcms/pull/2312)
* Blog: Make the module templates more extendable [#2303](https://github.com/forkcms/forkcms/pull/2303)
* Docker: Multiple improvements [#2168](https://github.com/forkcms/forkcms/pull/2168)
* Faq: Make the module templates more extendable [#2304](https://github.com/forkcms/forkcms/pull/2304)
* FormBuilder: Make the module templates more extendable [#2305](https://github.com/forkcms/forkcms/pull/2305)
* Github: Turn PR hints into comments [#2386](https://github.com/forkcms/forkcms/pull/2386)
* Installer: Visual update and added progressbar [#2404](https://github.com/forkcms/forkcms/pull/2404)
* Mailmotor: Make the module templates more extendable [#2302](https://github.com/forkcms/forkcms/pull/2302)
* MediaGalleries: Make the module templates more extendable [#2308](https://github.com/forkcms/forkcms/pull/2308)
* MediaLibrary: Make the module templates more extendable [#2309](https://github.com/forkcms/forkcms/pull/2309)
* MediaLibrary: Updated documentation [#2390](https://github.com/forkcms/forkcms/pull/2390)
* Pages: Improved the handling of 404 and formbidden pages [#2278](https://github.com/forkcms/forkcms/pull/2278)
* Pages: Make the module templates more extendable [#2310](https://github.com/forkcms/forkcms/pull/2310)
* Profiles: Make the module templates more extendable [#2311](https://github.com/forkcms/forkcms/pull/2311)
* Search: Make the module templates more extendable [#2306](https://github.com/forkcms/forkcms/pull/2306)
* Tags: Make the module templates more extendable [#2307](https://github.com/forkcms/forkcms/pull/2307)

Fixed:
* Core: Fix edge case where the getAction method returned null instead of the default action [#2405](https://github.com/forkcms/forkcms/pull/2405)
* Core: Fix slow external url check plus it didn't work inside docker containers [#2402](https://github.com/forkcms/forkcms/pull/2402)
* Core: Fix variable horizontal does not exist in form templates [#2397](https://github.com/forkcms/forkcms/pull/2397)
* Core: Add correct error class with html5 validation [#2366](https://github.com/forkcms/forkcms/pull/2366)
* Core: Fix stdClass casing [#2374](https://github.com/forkcms/forkcms/pull/2374)
* Analytics: Fix charts [#2379](https://github.com/forkcms/forkcms/pull/2379)
* Docs: Add missing queries for v5 migration [#2391](https://github.com/forkcms/forkcms/pull/2391)
* Docs: Use proper relative links to docs pages [#2385](https://github.com/forkcms/forkcms/pull/2385)
* FAQ: Fix url in spam message [#2371](https://github.com/forkcms/forkcms/pull/2371)
* Locale: Fix locale analyse action [#2387](https://github.com/forkcms/forkcms/pull/2387)
* MediaLibrary: Documentation fixes [#2393](https://github.com/forkcms/forkcms/pull/2393)
* MediaLibrary: Fix absolute width/height crop [#2299](https://github.com/forkcms/forkcms/pull/2299)
* MediaLibrary: Fix getConnectedMediaItems returning false instead of null [#2401](https://github.com/forkcms/forkcms/pull/2401)
* Profiles: Fix js error on the groups checkboxes [#2382](https://github.com/forkcms/forkcms/pull/2382)
* Search: Fix get cached results when a cacheFile is found [#2384](https://github.com/forkcms/forkcms/pull/2384)
* Search: Fix live suggest not using the theme templates [#2392](https://github.com/forkcms/forkcms/pull/2392)

Removed:
* Core: removed some old IE6-IE9 fallbacks [#2357](https://github.com/forkcms/forkcms/pull/2357)

Deprecated:
* Core: CKFinder is deprecated in favour of the media library, more info can be found here [#2408](https://github.com/forkcms/forkcms/pull/2408)


5.0.7 (2017-11-22)
------------------

Expand Down
26 changes: 17 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
FROM php:7.1-apache
MAINTAINER Fork CMS <[email protected]>
LABEL maintainer="Fork CMS <[email protected]>"

# Enable Apache mod_rewrite
RUN a2enmod rewrite

# Install GD2
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng12-dev && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install -j$(nproc) gd
docker-php-ext-install -j$(nproc) gd && \
rm -rf /var/lib/apt/lists/*

# Install pdo_mysql
RUN docker-php-ext-install pdo_mysql
Expand All @@ -22,25 +23,28 @@ RUN docker-php-ext-install mbstring
RUN docker-php-ext-install zip

# Install intl
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
libicu-dev \
zlib1g-dev && \
docker-php-ext-configure intl && \
docker-php-ext-install intl
docker-php-ext-install intl && \
rm -rf /var/lib/apt/lists/*

# Custom php.ini settings
COPY var/docker/php/php.ini ${PHP_INI_DIR}/php.ini

# Install and configure XDebug
RUN pecl install xdebug && docker-php-ext-enable xdebug
COPY var/docker/php/xdebug.ini ${PHP_INI_DIR}/conf.d/xdebug.init
RUN echo 'xdebug.remote_host="${DOCKER_HOST_IP}"' >> ${PHP_INI_DIR}/conf.d/xdebug.ini
RUN pecl install xdebug && \
docker-php-ext-enable xdebug && \
rm -rf /tmp/pear

# Install composer
RUN curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/bin/ --filename=composer

# Set the work directory to /var/www/html so all subsequent commands in this file start from that directory.
# Also set this work directory so that it uses this directory everytime we use docker exec.
WORKDIR /var/www/html

# Install the composer dependencies (no autoloader yet as that invalidates the docker cache)
Expand All @@ -49,11 +53,15 @@ COPY composer.lock ./
RUN composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest && \
composer clear-cache

# Bundle source code into container
# Bundle source code into container. Important here is that copying is done based on the rules defined in the .dockerignore file.
COPY . /var/www/html

# Dump the autoloader
RUN composer dump-autoload --optimize --classmap-authoritative --no-dev

# Give apache write access to host
RUN chown -R www-data:www-data /var/www/html

# This specifies on which port the application will run. This is pure communicative and makes this 12 factor app compliant
# (see https://12factor.net/port-binding).
EXPOSE 80 443
2 changes: 1 addition & 1 deletion UPGRADE_5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ SPOON_CHARSET is removed. From now on you need to get the charset by using the k

## PATH_WWW

PATH_WWW is removed. From now on you need to get the path to the web directory by using the site.path_www parameter, f.e.
PATH_WWW is deprecated. From now on you need to get the path to the web directory by using the site.path_www parameter, f.e.
Twig has trouble with traversing directories, so in that or similar cases you can wrap it with the `realpath` function.

$this->getContainer()->getParameter('site.path_www')
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.7
5.1.0
49 changes: 36 additions & 13 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ framework:
engines: ['twig']
session:
handler_id: ~
cache:
app: cache.adapter.filesystem
pools:
cache.search:
adapter: cache.app
public: true
default_lifetime: 3600

# Assetic Configuration
assetic:
Expand Down Expand Up @@ -79,9 +86,11 @@ liip_imagine:
quality: 95
# list of transformations to apply (the "filters")
filters:
# create a thumbnail: set size to 120x90 and use the "outbound" mode
# to crop the image when the size ratio of the input differs
## Using the "thumbnail + background" combination will crop the
## the centered image to create your required width/height.
# Use the "outbound" mode to crop the image when the size ratio of the input differs
thumbnail: { size : [140, 90], mode : outbound }
background: { size : [140, 90], position : center }
media_library_lightbox_small:
filters:
scale: { dim : [800, 600] }
Expand All @@ -96,19 +105,27 @@ liip_imagine:
thumbnail: { size : [1600, 500], mode : inbound }

services:
form.type.editor:
class: Backend\Form\Type\EditorType
tags:
- { name: form.type, alias: editor}
form.type.meta:
class: Backend\Form\Type\MetaType
arguments:
- "@fork.repository.meta"
- "@translator"
tags:
- { name: form.type, alias: meta}
templating.name_parser.public:
alias: templating.name_parser
public: true
file_locator.public:
alias: file_locator
public: true
logger.public:
alias: logger
public: true
command_bus.public:
alias: command_bus
public: true
liip_imagine.cache.manager.public:
alias: liip_imagine.cache.manager
public: true
mailmotor.factory.public:
alias: mailmotor.factory
public: true
database:
class: SpoonDatabase
public: true
arguments:
- "%database.driver%"
- "%database.host%"
Expand Down Expand Up @@ -149,22 +166,26 @@ services:
- "@cache.adapter"
cache.pool:
class: MatthiasMullie\Scrapbook\Psr6\Pool
public: true
arguments:
- "@cache.buffer"
cache.backend_navigation:
class: Backend\Core\Engine\NavigationCache
public: true
arguments:
- "@database"
- "@cache.pool"

fork.settings:
class: Common\ModulesSettings
public: true
arguments:
- "@database"
- "@cache.pool"

fork.cookie:
class: Common\Core\Cookie
public: true

fork.cookie_setter:
class: Common\EventListener\ForkCookieSetter
Expand All @@ -180,12 +201,14 @@ services:

templating:
class: Frontend\Core\Engine\TwigTemplate
public: true
arguments:
- "@twig"
- "@templating.name_parser"
- "@templating.locator"

translator:
class: Common\Language
public: true
arguments:
- "@translator.selector"
11 changes: 11 additions & 0 deletions app/config/config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ monolog:
type: stream
path: "%site.path_www%/var/logs/%kernel.environment%.log"
level: debug
dockerstdout:
type: stream
path: php://stdout
level: debug
formatter: monolog.full_trace_formatter
channels: ["!event"]

services:
database_collector:
Expand All @@ -21,3 +27,8 @@ services:
- "@database"
tags:
- { name: data_collector, template: "database_data_collector.html.twig", id: "database" }

monolog.full_trace_formatter:
class: Monolog\Formatter\LineFormatter
calls:
- [includeStacktraces]
10 changes: 10 additions & 0 deletions app/config/config_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ framework:
handler_id: ~
validation:
enable_annotations: true
cache:
app: cache.adapter.filesystem
pools:
cache.search:
adapter: cache.app
public: true
default_lifetime: 3600

# Assetic Configuration
assetic:
Expand Down Expand Up @@ -45,13 +52,16 @@ services:
# dummy service during the installation
fork.settings:
class: stdClass
public: true

# dummy service during the installation
cache.pool:
class: stdClass
public: true

database:
class: SpoonDatabase
public: true
arguments:
- "%database.driver%"
- "%database.host%"
Expand Down
1 change: 1 addition & 0 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ doctrine:
services:
database:
class: SpoonDatabase
public: true
arguments:
- "%database.driver%"
- "%database.host%"
Expand Down
2 changes: 2 additions & 0 deletions app/config/doctrine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ doctrine_orm_bridge:
services:
fork.entity.create_schema:
class: Common\Doctrine\Entity\CreateSchema
public: true
arguments:
- "@doctrine.orm.entity_manager"

fork.repository.meta:
class: Common\Doctrine\Repository\MetaRepository
public: true
factory: ["@doctrine.orm.entity_manager", getRepository]
arguments:
- Common\Doctrine\Entity\Meta
Loading

0 comments on commit 5bc1162

Please sign in to comment.