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

Tooling & PHP Version Updates #10

Merged
merged 12 commits into from
Sep 20, 2024
Merged

Tooling & PHP Version Updates #10

merged 12 commits into from
Sep 20, 2024

Conversation

sixlive
Copy link
Contributor

@sixlive sixlive commented Sep 12, 2024

Description

Overall this PR is prepping for release 2.0 with the following changes:

  • Drop support for PHP 7.x, 8.0, 8.1 (unsupported versions)
  • Add Github Actions for tests and formatting
  • Migrate to Pest for testing
    • Migrate tests to Pest format
  • Drop support for TravisCI
  • Setup for Rector and Pint
    • Apply Rector and Pint formatting
  • Add git hooks for DX

@sixlive sixlive self-assigned this Sep 12, 2024
@sixlive sixlive changed the title Tooling updates Tooling & PHP Version Updates Sep 12, 2024
@sixlive sixlive mentioned this pull request Sep 13, 2024
@sixlive sixlive marked this pull request as ready for review September 19, 2024 21:09
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
Copy link
Member

Choose a reason for hiding this comment

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

@sixlive Can this file be removed now, since we're using Pest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pest uses PHPUnit under the hood so the config file is still used

$response = $e instanceof RequestException && $e->hasResponse() ? $e->getResponse() : null;

$errorMessage = 'Error';
$errorCode = 0;

if ($response) {
$json = @json_decode((string)$response->getBody());
if ($response instanceof \Psr\Http\Message\ResponseInterface) {
Copy link
Member

Choose a reason for hiding this comment

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

👍

return [
'User-Agent' => 'geocodio-library-php/1.2.0'
'User-Agent' => 'geocodio-library-php/1.2.0',
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is fine since it is addressed in #11 instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we address this in #11


describe('Custom relaxed preset', function (): void {
arch('No final classes')
->expect('EchoLabs\Sparkle')
Copy link
Member

Choose a reason for hiding this comment

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

Should this namespace be updated to Geocodio?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, copypasta

{
"disabled": [],
"hooks": {
"pre-commit": [
Copy link
Member

Choose a reason for hiding this comment

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

Neat!! 👍

@sixlive sixlive merged commit 1f55cb6 into master Sep 20, 2024
8 checks passed
@sixlive sixlive deleted the tooling-updates branch September 20, 2024 14:01
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