cakephp / bake

The Bake Command Plugin
Other
110 stars 101 forks source link

Bake 1.5 creates conflicts regarding twig #385

Closed inoas closed 6 years ago

inoas commented 6 years ago

Sadly TwigView 4.x is being used, which again does not support Twig2. composer require twig/twig thus does not work.

Possible fixes:

p.s.: IMHO this matter really can only be fixed by upping the minimum php requirement to 7.x for cakephp/cakephp and all related packages either during 3.x or within 4.x lifetime.

markstory commented 6 years ago

From looking at TwigView's composer requirements it has ^2.4.3. Is twig2 referencing something else? Why would bake or cakephp/app require php 7? All of bakes tests are passing against PHP 5.6 today.

ADmad commented 6 years ago

@markstory bake uses TwigView 4.x which uses Twig 1.x.

inoas commented 6 years ago

After downgrading to cakephp/bake 1.4.* things do work. cakephp/bake 1.5 is pointing at "wyrihaximus/twig-view": "^4.1" which is pointing at twig 1.x: https://github.com/WyriHaximus/TwigView/blob/4.x/composer.json#L26

inoas commented 6 years ago

I am not saying we should force php7.0 for cakephp/bake (but rather for all of cakephp as soon as possible).

What I am saying is that cakephp/bake 1.5 should have been 2.0 because of compatibility problems OR cakephp/app pointing at 1.4.* instead of ^1.4

markstory commented 6 years ago

Any dependency we add could cause conflicts with other libraries. But I don't think that possibility should require a major version bump, as there weren't any breaking changes. If an application requires twig2 they will have to pin to bake 1.4.*.

inoas commented 6 years ago

Well using twig 1.x in new projects now is a non-future-proof choice, so many projects using twig and bake alongside will have to stick to bake 1.4.*.

Depending on how long it will be until cakephp4 (or cakephp3 + minimum php7), gets out of the oven, that could hurt.

markstory commented 6 years ago

Depending on how long it will be until cakephp4

I'm hoping we can get it out in early 2018, shortly after the 3.6 release.