Skip to content
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

Adds 5.5 Compatibility. #6

Closed
wants to merge 2 commits into from
Closed

Adds 5.5 Compatibility. #6

wants to merge 2 commits into from

Conversation

donatj
Copy link
Contributor

@donatj donatj commented Dec 22, 2015

For those of us not quite on the bleeding edge yet who still would like tests, this is all that needs to be done to make this work in 5.5

@@ -6,13 +6,13 @@
"preferred-install": "source"
},
"require": {
"php": "^5.6|^7.0",
"php": "^5.5|^5.6|^7.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

😱 😷 ❓ 💣

@kukulich
Copy link
Contributor

I really don't think that PHP 5.5 is bleeding edge. PHP 5.6 was released 28 Aug 2014, that's more that 1 year ago. And 5.5 doesn't have active support anymore, see http://php.net/supported-versions.php
So I think it's a bad idea to support 5.5.

@donatj
Copy link
Contributor Author

donatj commented Dec 22, 2015

The 5.5 install base is still very large, much larger than 5.6. - via: link *corrected link

You're eliminating much of your audience.

screen shot 2015-12-22 at 1 17 23 pm

I think not supporting it even though your tests pass in it is silly and stubborn.

Moreover OS X as well as many linux distros ship with 5.5 still.

@kukulich
Copy link
Contributor

From my point of view it's silly to use PHP version that is not actively supported anymore.

We don't use 5.5 so adding support is just pointless work for us.

@ondrejmirtes
Copy link
Contributor

I think it's more profitable for everybody to move on to newer versions of PHP and benefit from them. I'd rather spend time improving PHP 7 support (which is the future!) rather than solving compatibility for older versions of PHP. By staying on 5.5, you are doing yourself a disservice and will bump into more and more hurdles as everybody else moves on.

As one can see in your pull request, the compatibility with older versions of PHP is not without drawbacks - you had to downgrade PHPUnit version which means I cannot benefit from goodies in newer versions. Also, I cannot benefit from new features and bugfixes present in PHP 5.6.

If I allowed 5.5 now and wanted to drop it in the future, it would mean cutting off some portion of the userbase and a huge BC break.

My target audience for this (and other tools currently in the making) are serious projects whose developers can influence what version of a language they are on.

@ondrejmirtes
Copy link
Contributor

Also, do you know about composer install --ignore-platform-reqs? It's a dangerous workaround with no warranty, but you can try using it for now.

@donatj
Copy link
Contributor Author

donatj commented Dec 22, 2015

I wanted to be able to run some of these in our CI environment. That's way too dangerous.

I'll probably just end up copying the ones I want into our internal code standard. Far from ideal.

Some closing thoughts:

My target audience for this (and other tools currently in the making) are serious projects whose developers can influence what version of a language they are on.

Those are inversely proportional. The bigger your project, the more inertia in the deployment architecture. Hobbyists can change language versions half a dozen times a day. For large businesses upgrading costs a lot of time, money and man hours. An edge case difference that wasn't caught by automated testing can cost tens of thousands of dollars. Jumping versions is not something to be taken lightly.

@ondrejmirtes
Copy link
Contributor

Isn't it better to put your efforts to upgrading your infrastructure to PHP
5.6 or at least creating a different 5.6-only CI environment to run this
standard on rather than painfully sticking to 5.5?

On Tuesday, 22 December 2015, Jesse Donat notifications@github.com wrote:

I wanted to be able to run some of these in our CI environment. That's way
too dangerous.

I'll probably just end up copying the ones I want into our internal code
standard. Far from ideal.

Some closing thoughts:

My target audience for this (and other tools currently in the making) are
serious projects whose developers can influence what version of a language
they are on.

Those are inversely proportional. The bigger your project, the more
inertia in the deployment architecture. Hobbyists can change language
versions half a dozen times a day. For large businesses upgrading costs a
lot of time, money and man hours. An edge case different that wasn't caught
by automated testing can cost tens of thousands of dollars. Jumping
versions is not something to be taken lightly.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@janlanger
Copy link
Member

@donatj Instead od copying, you can also stick with your fork, keep the PHP 5.5 compatibility there and include it in your composer.json. Since there is currently no 5.6-only code in sniffs, it should be easy to manage (at least for now).

@ondrejmirtes
Copy link
Contributor

For large businesses upgrading costs a lot of time, money and man hours.

Costs of not-upgrading are even higher in the long term.

@donatj
Copy link
Contributor Author

donatj commented Dec 22, 2015

How so as long as their are security updates?
On Dec 22, 2015 5:46 PM, "Ondřej Mirtes" notifications@github.com wrote:

For large businesses upgrading costs a lot of time, money and man hours.

Costs of not-upgrading are even higher.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@ondrejmirtes
Copy link
Contributor

The later you upgrade, the more difficult it is because code bases get bigger over time so there is more (potentially incompatible) code to upgrade.

Also, PHP 7 comes with huge performance gains in CPU performance and memory consumption, so you could even save money on servers.

See more arguments here. I'm going to close this PR because I believe it does not make sense to support version of PHP with already ended active support and security support ending in 6 months.

bkdotcom added a commit to bkdotcom/coding-standard that referenced this pull request Jan 30, 2023
# This is the 1st commit message:

Initial commit.   Adds  SlevomatCodingStandard\Sniffs\Arrays\SortedSniff & SlevomatCodingStandard\Helpers\ArrayHelper

# This is the commit message slevomat#2:

@phpcsSuppress can be with comment

# This is the commit message slevomat#3:

Changed access modifier for the method getSniffClassName from private to protected to make overriding this method possible

# This is the commit message slevomat#4:

Changed the way getSniffClassName method is called from self to static so that when the method is overridden it uses the overridden method

# This is the commit message slevomat#5:

Support of phpstan/phpdoc-parser 1.16

# This is the commit message slevomat#6:

SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator: New sniff
jrfnl added a commit to jrfnl/slevomat-coding-standard that referenced this pull request Sep 28, 2023
…ive coding

```
Fatal error: Uncaught TypeError: SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff::processCondition(): Argument slevomat#3 ($parenthesisCloser) must be of type int, null given, called in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php on line 56 and defined in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php:59
Stack trace:
#0 path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php(56): SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff->processCondition(Object(PHP_CodeSniffer\Files\LocalFile), 100, NULL, 'if')
slevomat#1 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Files\File.php(509): SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff->process(Object(PHP_CodeSniffer\Files\LocalFile), 99)
slevomat#2 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Files\LocalFile.php(92): PHP_CodeSniffer\Files\File->process()
slevomat#3 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(632): PHP_CodeSniffer\Files\LocalFile->process()
slevomat#4 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(438): PHP_CodeSniffer\Runner->processFile(Object(PHP_CodeSniffer\Files\LocalFile))
slevomat#5 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(116): PHP_CodeSniffer\Runner->run()
slevomat#6 D:\000_GitHub\PHPCS\PHP_CodeSniffer\bin\phpcs(18): PHP_CodeSniffer\Runner->runPHPCS()
slevomat#7 {main}
  thrown in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php on line 59
```
kukulich pushed a commit to jrfnl/slevomat-coding-standard that referenced this pull request Oct 5, 2023
…ive coding

```
Fatal error: Uncaught TypeError: SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff::processCondition(): Argument slevomat#3 ($parenthesisCloser) must be of type int, null given, called in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php on line 56 and defined in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php:59
Stack trace:
#0 path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php(56): SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff->processCondition(Object(PHP_CodeSniffer\Files\LocalFile), 100, NULL, 'if')
slevomat#1 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Files\File.php(509): SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff->process(Object(PHP_CodeSniffer\Files\LocalFile), 99)
slevomat#2 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Files\LocalFile.php(92): PHP_CodeSniffer\Files\File->process()
slevomat#3 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(632): PHP_CodeSniffer\Files\LocalFile->process()
slevomat#4 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(438): PHP_CodeSniffer\Runner->processFile(Object(PHP_CodeSniffer\Files\LocalFile))
slevomat#5 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(116): PHP_CodeSniffer\Runner->run()
slevomat#6 D:\000_GitHub\PHPCS\PHP_CodeSniffer\bin\phpcs(18): PHP_CodeSniffer\Runner->runPHPCS()
slevomat#7 {main}
  thrown in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php on line 59
```
kukulich pushed a commit that referenced this pull request Oct 5, 2023
…ive coding

```
Fatal error: Uncaught TypeError: SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff::processCondition(): Argument #3 ($parenthesisCloser) must be of type int, null given, called in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php on line 56 and defined in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php:59
Stack trace:
#0 path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php(56): SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff->processCondition(Object(PHP_CodeSniffer\Files\LocalFile), 100, NULL, 'if')
#1 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Files\File.php(509): SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff->process(Object(PHP_CodeSniffer\Files\LocalFile), 99)
#2 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Files\LocalFile.php(92): PHP_CodeSniffer\Files\File->process()
#3 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(632): PHP_CodeSniffer\Files\LocalFile->process()
#4 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(438): PHP_CodeSniffer\Runner->processFile(Object(PHP_CodeSniffer\Files\LocalFile))
#5 D:\000_GitHub\PHPCS\PHP_CodeSniffer\src\Runner.php(116): PHP_CodeSniffer\Runner->run()
#6 D:\000_GitHub\PHPCS\PHP_CodeSniffer\bin\phpcs(18): PHP_CodeSniffer\Runner->runPHPCS()
#7 {main}
  thrown in path\to\SlevomatCodingStandard\Sniffs\ControlStructures\AssignmentInConditionSniff.php on line 59
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants