From f0791abd6a622dd4020222c3ca1ba3c851b1ea54 Mon Sep 17 00:00:00 2001 From: Bastien Philippe Date: Mon, 30 Dec 2024 16:25:58 +0100 Subject: [PATCH] Revert "Small changes" This reverts commit bb9c19a9d16b24dbbf4230925abcfbd19b223897. --- README.md | 2 +- composer.json | 4 ++-- .../Test/UnitTestGenerators/JsonResourceTestGenerator.php | 2 +- src/Support/Composer.php | 4 ++-- src/Support/Finder.php | 4 ++-- test-laravel/composer.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c11507c..834f2a1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Latest Version on Packagist](https://img.shields.io/packagist/v/soyhuce/laravel-somake.svg?style=flat-square)](https://packagist.org/packages/soyhuce/laravel-somake) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3Arun-tests+branch%3Amain) -[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/php-cs-fixer.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) +[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![GitHub PHPStan Action Status](https://img.shields.io/github/actions/workflow/status/soyhuce/laravel-somake/phpstan.yml?branch=main&label=PHPStan&style=flat-square)](https://github.com/soyhuce/laravel-somake/actions?query=workflow%3A"PHPStan"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/soyhuce/laravel-somake.svg?style=flat-square)](https://packagist.org/packages/soyhuce/laravel-somake) diff --git a/composer.json b/composer.json index d5d7cea..5bc395f 100644 --- a/composer.json +++ b/composer.json @@ -33,8 +33,8 @@ "nunomaduro/collision": "^8.0", "larastan/larastan": "^3.0", "orchestra/testbench": "^9.0", - "pestphp/pest": "^3.0", - "pestphp/pest-plugin-laravel": "^3.0", + "pestphp/pest": "^2.12", + "pestphp/pest-plugin-laravel": "^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^2.0", "spatie/laravel-data": "^4.0", diff --git a/src/Domains/Test/UnitTestGenerators/JsonResourceTestGenerator.php b/src/Domains/Test/UnitTestGenerators/JsonResourceTestGenerator.php index 2a8e095..a65e2de 100644 --- a/src/Domains/Test/UnitTestGenerators/JsonResourceTestGenerator.php +++ b/src/Domains/Test/UnitTestGenerators/JsonResourceTestGenerator.php @@ -47,7 +47,7 @@ public function data(string $class): array } [$modelFqcn, $modelClassBasename] = class_exists($modelMixin) - ? [mb_ltrim($modelMixin, '\\'), class_basename($modelMixin)] + ? [ltrim($modelMixin, '\\'), class_basename($modelMixin)] : [null, class_basename($modelMixin)]; return [ diff --git a/src/Support/Composer.php b/src/Support/Composer.php index 86053ca..b3eba52 100644 --- a/src/Support/Composer.php +++ b/src/Support/Composer.php @@ -34,7 +34,7 @@ public function findPath(string $namespace): string $suffix = (string) Str::of($namespace)->after($rootNamespace)->replace('\\', DIRECTORY_SEPARATOR); - return mb_rtrim(realpath($path) . DIRECTORY_SEPARATOR . $suffix, DIRECTORY_SEPARATOR); + return rtrim(realpath($path) . DIRECTORY_SEPARATOR . $suffix, DIRECTORY_SEPARATOR); } /** @@ -56,6 +56,6 @@ public function findNamespace(string $path): string $suffix = (string) Str::of($path)->after($rootPath)->replace(DIRECTORY_SEPARATOR, '\\'); - return mb_rtrim(mb_rtrim((string) $rootNamespace, '\\') . $suffix, '\\'); + return rtrim(rtrim((string) $rootNamespace, '\\') . $suffix, '\\'); } } diff --git a/src/Support/Finder.php b/src/Support/Finder.php index ba7264c..688345f 100644 --- a/src/Support/Finder.php +++ b/src/Support/Finder.php @@ -36,7 +36,7 @@ public function domains(): Collection public function domainPath(string $path): string { - return mb_rtrim($this->domainRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR); + return rtrim($this->domainRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR); } private function domainRootPath(): string @@ -55,7 +55,7 @@ public function applications(): Collection public function applicationPath(string $path): string { - return mb_rtrim($this->applicationRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR); + return rtrim($this->applicationRootPath() . Str::start($path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR); } /** diff --git a/test-laravel/composer.json b/test-laravel/composer.json index 20b70b5..d740d6c 100644 --- a/test-laravel/composer.json +++ b/test-laravel/composer.json @@ -8,7 +8,7 @@ ], "license": "MIT", "require": { - "php": "^8.3" + "php": "^8.2" }, "require-dev": { "spatie/laravel-data": "^4.0"