8000 add machine-readable version constants by xabbuh · Pull Request #2222 · twigphp/Twig · GitHub
[go: up one dir, main page]

Skip to content

add machine-readable version constants #2222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2016
Merged

Conversation

xabbuh
Copy link
Contributor
@xabbuh xabbuh commented Nov 7, 2016

This will make it easier to implement version depending features (see symfony/symfony#20440 (comment) for an example).

@fabpot
Copy link
Contributor
fabpot commented Nov 7, 2016

👍

@fabpot
Copy link
Contributor
fabpot commented Nov 7, 2016

version_compare would work well as well, no?

const MAJOR_VERSION = 1;
const MINOR_VERSION = 27;
const RELEASE_VERSION = 1;
const EXTRA_VERSION = 'DEV';
Copy link
Contributor

Choose a reason for hiding this comment

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

what would value will this have in releases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xabbuh
Copy link
Contributor Author
xabbuh commented Nov 7, 2016

@fabpot Should work too. But checking for integer values is faster and allows for greater flexibility.

@fabpot
Copy link
Contributor
fabpot commented Nov 7, 2016

I know and anyway, I like that, same as we have in Symfony.

@SpacePossum For releases, EXTRA would be empty (exact same thing as for Symfony).

@SpacePossum
Copy link
Contributor

nice, 👍 🚢

@fabpot
Copy link
Contributor
fabpot commented Nov 7, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit bf07db4 into twigphp:1.x Nov 7, 2016
fabpot added a commit that referenced this pull request Nov 7, 2016
This PR was merged into the 1.x branch.

Discussion
----------

add machine-readable version constants

This will make it easier to implement version depending features (see symfony/symfony#20440 (comment) for an example).

Commits
-------

bf07db4 add machine-readable version constants
@xabbuh xabbuh deleted the version-constants branch November 7, 2016 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0