Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.

[WIP] 2.0 - #167

Merged
andrerom merged 25 commits into
masterfrom
2.0
Dec 15, 2017
Merged

andrerom merged 25 commits into
masterfrom
2.0

Conversation

@andrerom

@andrerom andrerom commented Feb 22, 2017 •

Copy link
Copy Markdown
Contributor

Work in progress, contribution/review/thoughts welcome.

Done:

  • (not seen here are fixes in all repos to be symfony 2.8/3 compatible by a lot of contributors)
  • Merged in changes from symfony standard 3.3 & switched to use kernel 7.0 which requires php7
  • Cleaned up env parameters to remove most of env/docker.php concept and rather use:
    • Symfony 3.2 native env() system for runtime settings
    • incenteev parameter handler with env variable mapping for compile time settings (those used by config builders to validate config, e.g. mail transport for switfmailer)
      • Needs re compile on env variables change, might re add in env/docker.php instead
  • BC so far besides directory structure is:
    • removal of SYMFONY_CLASSLOADER_FILE as composer is handling all class loading now
    • removal of SYMFONY_HTTP_CACHE_CLASS, as with kernel if you need to do changes on AppCache it's "fine" to do it on the class and handle conflicts on upgrades yourself so you are aware of upstream changes.
    • removal of several parameters in favour of env() variables
  • Changs for new Admin UI

Todos:

  • DON'T MERGE THIS FROM GITHUB INTERFACE! Once ready, just close this PR, merge changes into master from git, and re configure master to 2.1! (leaving this branch for 2.0 release)
  • Get Behat and hence also travis to run again
  • Update docker config to work with the new ENVs

@andrerom
andrerom force-pushed the 2.0 branch 3 times, most recently from dbfae82 to f9630d7 Compare March 1, 2017 20:07
@andrerom
andrerom force-pushed the 2.0 branch 2 times, most recently from aabb79c to 619ef66 Compare March 21, 2017 16:37
Comment thread app/config/config.yml Outdated
field_name: ezxform_token
form: ~
csrf_protection:
enabled: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just add:

csrf_protection: ~

@andrerom andrerom May 2, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will adapt when rebasing up from master ;)

Comment thread app/config/config.yml Outdated
translator: { fallback: '%locale_fallback%' }
secret: '%env(SYMFONY_SECRET)%'
translator: { fallback: "%locale_fallback%" }
secret: "%env(SYMFONY_SECRET)%"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why we changed back to "?
Reason why it was changed to ' was to stay close to upstream: https://github.com/symfony/symfony-standard/blob/3.4/app/config/config.yml#L11-L24

So maybe we we can rebase these changes away to reduce the diff (which will cause conflict when rebasing on master again).

Comment thread app/config/routing.yml

_ezpublishRoutes:
resource: '@EzPublishCoreBundle/Resources/config/routing/internal.yml'
kernel.internal:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these have ez. prefix?

Comment thread app/config/config.yml
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: env/docker.php }
- { resource: env/platformsh.php }

@andrerom andrerom Oct 10, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we find a way to avoid them? Or should we re add these?

I was originally trying to remove the docker one thing I could do everything with env, but the cache case remaining in env/docker.php I did not manage to find a way around.

Also afaik don't think we can avoid the env/platformsh.php in some form as the env variable comes as a json string.

Comment thread app/config/security.yml Outdated
logout: ~

main:
default:

@andrerom andrerom Oct 10, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's main in symfony 3.x: https://github.com/symfony/symfony-standard/blob/3.4/app/config/security.yml#L16 But if that breaks anything I guess we have changes to do other places to if we want to adapt for it.

also the comments comes from same source.

Comment thread bower.json Outdated
{
"name": "ezplatform-admin-ui",
"authors": [
"Nattfarinn <nattfarinn@gmail.com>"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we allign with composer.json we would need to adopt this.

ref:

    {
        "name": "eZ dev-team & eZ Community",
        "homepage": "https://github.com/ezsystems/ezplatform/contributors"
    },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is surprisingly my modification 😀
bower install said to me:

bower invalid-meta  The "name" is recommended to be lowercase, can contain digits, dots, dashes

With ampersand it even crashes :)

@andrerom andrerom Oct 11, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it doesn't need to be the exact same, point it so attribute teams and not the once who created the file in question ;)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we're talking about two things:

  • name is supposed to be package name, not author
  • author here really should be eZ dev-team & eZ Community

But... @sunpietro and @dew326 mentioned to me yesterday that bower won't even be a part of final version, as there will be separate repository with already downloaded assets, right guys?

@andrerom andrerom Oct 11, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a part of final version, as there will be separate repository with already downloaded assets, right guys?

makes sense, was strange to find it here, then of course ignore this thread and let's not waste more breath on it :)

Comment thread composer.json
"description": "eZ Platform distribution",
"homepage": "https://github.com/ezsystems/ezplatform",
"license": "GPL-2.0",
"type": "project",

@andrerom andrerom Oct 10, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be removed here, cause if it is it will default to library:
https://getcomposer.org/doc/04-schema.md#type

Edit: I see it was moved down, we can remove this change in rebase

Comment thread composer.json Outdated
}
},
"branch-alias": {
"dev-master": "2.0.x-dev"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: we'll need this once this is master again

Comment thread web/app.php Outdated
if (($useDebugging = getenv('SYMFONY_DEBUG')) === false || $useDebugging === '') {
$useDebugging = $environment === 'dev';
require __DIR__.'/../vendor/autoload.php';
if (PHP_VERSION_ID < 70000) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we require higher version of PHP then 7.0 we can ommit thise lines

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's Symfony standard app.php file. I didn't change it at all, but you're right - we can remove this. :)

Comment thread web/app.php Outdated
if (PHP_VERSION_ID < 70000) {
$kernel->loadClassCache();
}
//$kernel = new AppCache($kernel);

@andrerom andrerom Oct 10, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, unsure on this. App cache should probably be on by default in eZ for better first impression for people installing, but having it on implies we need the env variables for it to be able to reconfigure for demos. Also for our own demo system it implies we are forced to use Varnish, however we are cable of doing that now so maybe it's ok on that point at least.

But maybe all this doesn't matter, if we manage to change to use Symfony Flex (which we imho should, too many benefits..) all of these things will need to be configurable with ENVs and stuff anyway as root is auto generated by flex based on packages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in anycase, if this needs to be commented here, i would add another comment to say why that's is commented. if not, to me code commented = code that can be deleted.

@andrerom andrerom Oct 11, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crevillo not needed yet, this is pre beta, we will probably revert some of these changes. this is very much WIP ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must just make sure that we don't forget about it. Maybe a todo item in the PR ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a todo to review more of the changes introduced in EZP-27888: Prepare Meta repository to use new eZ Platform Admin UI, but at least the AppCache stuff has been activated again in latests rebase here.

@andrerom

Copy link
Copy Markdown
Contributor Author

@emodric rebased, slimmed down the diff while at it @Nattfarinn. Might be ok to move this to review now.

Comment thread app/config/ezplatform.yml
purge_servers: ['%env(PURGE_SERVERS)%']
# Temporary hard coding session name during v2 development
session:
name: eZSESSID

@andrerom andrerom Nov 23, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this for admin UI or was it a hybrid ui temprary issue that we can now revert / rebase out ?

Comment thread app/config/routing.yml
prefix: '%ezpublish_rest.path_prefix%'
prefix: /api/ezp/v2

_ezpublishRestOptionsRoutes:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need REST options routes anymore?

Comment thread app/config/routing.yml
prefix: '%ezpublish_rest.path_prefix%'
type: rest_options

_liip_imagine:

@andrerom andrerom Nov 23, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this ever used for anything in the first place? aka should it not be in 1.x either? /cc @bdunogier

Comment thread composer.json
"ezsystems/ezplatform-admin-ui": "^1.0@dev",
"ezsystems/ezplatform-admin-ui-modules": "^1.0@dev",
"ezsystems/ezplatform-admin-ui-assets": "^0.3",
"ezsystems/ezplatform-admin-ui-assets": "^0.4",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ezsystems/ezplatform-admin-ui would specify this as dependency we would only need to specify it here and bump it when needing non stable packages ("0.x" is in that sense considered "stable").

Nattfarinn and others added 10 commits December 6, 2017 15:34
…t of eZ Platform v2 (#232)

* [Composer] EZP-28223: Added dependency on ezsystems/behatbundle

* EZP-28223: Enabled Behat bundles in AppKernel

* [REST Tests] Added dependency on phpunit/phpunit to run REST tests

REST Functional tests are run from within docker container of
ezplatform web app, so phpunit is required

* [Travis] Deprecated setup_from_external_repo script

* [Travis] Created setup_ezplatform script for dockerized test setup

* [Travis] Used setup_ezplatform script to setup docker containers

* [Travis] Added EZP-27752 create language command

* EZP-28223: Fixed default behat configuration

* [Travis] Optimized dependency setup for behat test

Instead of using composer pointing to local checkout, it installs all
dependencies and then overwrites the one being tested

It's less time consuming, because composer doesn't try to read all
tags and branches to find matching dependency before realizing
the one its looking for truly exists in the local checkout :)

* [Behat] Added BehatBundle behat profile with suites

* [Composer][AppKernel] Enabled eZ Platform Design Engine bundle

* EZP-28375: Restored Behat configuration
* [Travis] Use .env file for picking install

* [Travis] For now disable testing on varnsih
@andrerom
andrerom merged commit 6a13575 into master Dec 15, 2017
@andrerom

Copy link
Copy Markdown
Contributor Author

Master is now 2.1! 🌮

andrerom pushed a commit that referenced this pull request Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.