Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

[3.6] Make the bootstrap more robust#7763

Merged
bobdenotter merged 1 commit intobolt:3.6from
StevendeVries:bugfix-phpunit-bootstrap-autoloader
Apr 9, 2019
Merged

[3.6] Make the bootstrap more robust#7763
bobdenotter merged 1 commit intobolt:3.6from
StevendeVries:bugfix-phpunit-bootstrap-autoloader

Conversation

@StevendeVries
Copy link
Copy Markdown
Contributor

When using an old version of phpunit like 4.8.28 it does not provide a class called PHPUnit\Framework\TestCase required by bolt/bolt/tests/phpunit/unit/BoltUnitTest.php
The class is available in version 5.7. The dependancy with phpunit/php-code-coverage has also been updated.

Next to the phpunit version there is an issue when running the unittests, it can't seem to find the vendor/autoload.php. I've made the bootstrap a bit more defensive.
For context: We have the bootstrap located in: vendor/bolt/bolt/tests/phpunit/bootstrap.php

@StevendeVries
Copy link
Copy Markdown
Contributor Author

This currently breaks being compatible with PHP 5.5.9, however the unittests didn't work properly with PHP 5.5.9 anyway due to the lower phpunit version.

@bobdenotter
Copy link
Copy Markdown
Member

Do you think you could get this fixed for PHP 5.5.9? For Bolt 3, we'd need to keep compatible with that version, i'm afraid.

@StevendeVries
Copy link
Copy Markdown
Contributor Author

@bobdenotter if you really want to keep supporting 5.5.9 I would suggest reverting this PR and rewrite BoltUnitTest.php to remove the dependancy on PHPUnit\Framework\TestCase

@bobdenotter
Copy link
Copy Markdown
Member

@StevendeVries We use SemVer, so we cannot drop PHP 5.5.9 support for Bolt 3. Only in a major release can we bump the minimum requirements.

PHPUnit 5.7 should work on PHP 5.5.9 too, right?

@StevendeVries
Copy link
Copy Markdown
Contributor Author

StevendeVries commented Apr 1, 2019

Like stated in the ci: phpunit/phpunit 5.7.0 requires php ^5.6 😢

@StevendeVries
Copy link
Copy Markdown
Contributor Author

I'll remove the phpunit version increase to keep the bootstrap changes. Making it possible for you to merge.

@StevendeVries StevendeVries force-pushed the bugfix-phpunit-bootstrap-autoloader branch from 3c75118 to 3be0383 Compare April 9, 2019 07:39
@StevendeVries StevendeVries changed the title [3.6] Remove unsupported phpunit version and make the bootstrap more robust [3.6] Make the bootstrap more robust Apr 9, 2019
@bobdenotter
Copy link
Copy Markdown
Member

Thanks, mate! 👍

@bobdenotter bobdenotter merged commit e5ebe33 into bolt:3.6 Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants