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

Add PHP 7.4 testing and dependency updates. #924

Merged
merged 37 commits into from
Feb 13, 2020
Merged

Add PHP 7.4 testing and dependency updates. #924

merged 37 commits into from
Feb 13, 2020

Conversation

greg-1-anderson
Copy link
Member

Overview

This pull request:

  • Fixes a bug
  • Adds a feature
  • Breaks backwards compatibility
  • Has tests that cover changes
  • Adds or fixes documentation
  • Supports newer software

Summary

Test with PHP 7.4 and latest dependencies.

@greg-1-anderson
Copy link
Member Author

I expect the "highest" tests to fail here, and others to pass. Help with compatibility with Symfony 4.4.x would be appreciated.

@greg-1-anderson
Copy link
Member Author

The "lowest" tests are failing because I unpinned nikic/php-parser to make the newer dependency versions work, but this broke compatibility with older versions of php. Not super interested in spending a lot of time fixing the lowest test, but neither do I really want to make a new major version of Robo for PHP 7.4 just to drop PHP 7.1. If I did that, it would kill backporting PHP 7.4 support to the 1.x branch.

@greg-1-anderson
Copy link
Member Author

Also, PackExtractCept is working for me locally with PHP 7,4; I'm not sure why this test is failing on Travis.

@@ -12,8 +12,11 @@ public function test(array $args, $options =
'coverage' => false
])
{
$taskCodecept = $this->taskCodecept()
$collection = $this->collectionBuilder();

Choose a reason for hiding this comment

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

Line indented incorrectly; expected at least 12 spaces, found 8

$taskCodecept = $this->taskCodecept()
$collection = $this->collectionBuilder();

$taskCodecept = $collection->taskCodecept()

Choose a reason for hiding this comment

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

Line indented incorrectly; expected at least 12 spaces, found 8

RoboFile.php Outdated
->args($args);
$taskPHPUnit = $collection->taskPHPUnit();

Choose a reason for hiding this comment

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

Line indented incorrectly; expected at least 12 spaces, found 8

@greg-1-anderson
Copy link
Member Author

Travis seems to be missing the zip extension in their PHP 7.4 container.

*/
public function mktmpdir($basedir = false)
{
$tempfile = tempnam($basedir ?: $this->testDir ?: sys_get_temp_dir(),'robo-tests');

Choose a reason for hiding this comment

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

No space found after comma in function call

foreach ($this->tmpDirs as $tmpDir) {
try {
$fs->remove($tmpDir);
}

Choose a reason for hiding this comment

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

Expected 1 space after closing brace; newline found

public function testCssMinification()
{
if (version_compare(PHP_VERSION, '7.2.0') >= 0) {
$this->markTestSkipped('natxet/cssmin uses deprecated "each()" function (PHP 7.2+)');

Choose a reason for hiding this comment

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

Line indented incorrectly; expected at least 12 spaces, found 10


$this->fixtures->createAndCdToSandbox();

$sampleCss = $this->fixtures->dataFile('sample.css');

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed

$this->fixtures->createAndCdToSandbox();

$sampleCss = $this->fixtures->dataFile('sample.css');
$outputCss = 'minifiedSample.css';

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed

$sampleCss = $this->fixtures->dataFile('sample.css');
$outputCss = 'minifiedSample.css';

$initialFileSize = filesize($sampleCss);

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed


$initialFileSize = filesize($sampleCss);

$this->taskMinify($sampleCss)

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed

$initialFileSize = filesize($sampleCss);

$this->taskMinify($sampleCss)
->to('minifiedSample.css')

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed


$this->taskMinify($sampleCss)
->to('minifiedSample.css')
->run();

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed

->to('minifiedSample.css')
->run();

$this->assertFileExists($outputCss);

Choose a reason for hiding this comment

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

Spaces must be used to indent lines; tabs are not allowed

$this->assertFileExists('a.txt');
}

}

Choose a reason for hiding this comment

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

The closing brace for the class must go on the next line after the body


}

}

Choose a reason for hiding this comment

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

The closing brace for the class must go on the next line after the body

$this->assertFileNotExists('box/robo.txt');
}

}

Choose a reason for hiding this comment

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

The closing brace for the class must go on the next line after the body

$taskCodecept = $this->taskCodecept()
$collection = $this->collectionBuilder();

$taskPHPUnit = $collection->taskPHPUnit();

Choose a reason for hiding this comment

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

Line indented incorrectly; expected at least 12 spaces, found 8

@greg-1-anderson
Copy link
Member Author

There are still a bunch of tests that need to be ported, but we'll start with this set. See advisory in CONTRIBUTING.md.

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.

2 participants