symphonists / symphony-extensions-network

The "central place" for discussing, organizing and optimizing the Symphony CMS extensions eco-system.
MIT License
10 stars 1 forks source link

PHP7 compatibility of extensions #17

Open michael-e opened 7 years ago

michael-e commented 7 years ago

Symphony 2.7 will be compatible with PHP7, but many extensions won't. But how can a developer see if an extension will run on PHP7?

I wonder if we should define a "best practice" for marking extensions compatible with PHP7. Maybe we should add an (interim, to be removed later?) element or attribute to the meta XML scheme?

For example:

<release version="7.4" date="2017-04-28" min="2.7.x" max="2.x.x" php7="yes">
michael-e commented 7 years ago

Or even:

<release version="7.4" date="2017-04-28" min="2.7.x" max="2.x.x" php-min="5.3.x" php-max="7.x.x">
nitriques commented 7 years ago

When would you check this ? In the backend ? Or only on the website ? I like the second proposal...

michael-e commented 7 years ago

Even without any automatic check it would be a step forward for developers because they know where to look for compatibility.

Displaying it on the Symphony Extensions website or in the Symphony backend is only an additional "nice to have".

nitriques commented 7 years ago

Would you treat extensions with no information as PHP 5.x compatible ?

michael-e commented 7 years ago

Without information I would assume that it fits to Symphony's current requirement: php-min="5.3.x" php-max="5.x.x". (Or should we say max="5.6.x"?)

nitriques commented 7 years ago

Or should we say max="5.6.x"

I think we should. Are those default values always applied, or only when both php-min and php-max are missing ?

michael-e commented 7 years ago

only when both php-min and php-max are missing ?

No, I would suggest to keep it as simple as possible. Each parameter is optional and has a default/fallback value — not depending on the "sibling" (or any other) parameter.

nitriques commented 7 years ago

Perfect!

nitriques commented 6 years ago

Maybe we should use this: https://packagist.org/packages/bartlett/php-compatinfo ? Or revert to it only if the developer did not specified anything ? cc @alexnantel88

michael-e commented 6 years ago

Isn't it "overkill" to use such a library as fallback only? I think so.

And if we rely on this as "automagic" solution, there wouldn't be attributes in the XML anymore, right? One would have to upload an extension to a Symphony install in order to get the compat info. I prefer finding the values in the XML.

nitriques commented 6 years ago

there wouldn't be attributes in the XML anymore, right?

I would keep it. But the more I think about it, the more I see it as an extension.

michael-e commented 6 years ago

Hmmm, well, to me it simply feels like a "developer thingie". The extension developer also decides upon the attribute values for the min and max Symphony version.

nitriques commented 6 years ago

I meant, the "auto-checking part because the value is not in the xml"-extension ;)

michael-e commented 6 years ago

Ah, I understand. :-)