From ac2521f4c79faa3e0e2c3a55be2637137e9b3be6 Mon Sep 17 00:00:00 2001 From: Dmitry Ivanov Date: Mon, 14 Sep 2020 23:04:50 +0300 Subject: [PATCH] Upgrade to Laravel 8.x --- .travis.yml | 1 - README.md | 31 +---------------- composer.json | 14 ++++---- src/str.php | 31 ----------------- tests/str/StrLowerTest.php | 68 -------------------------------------- tests/str/StrUpperTest.php | 68 -------------------------------------- 6 files changed, 8 insertions(+), 205 deletions(-) delete mode 100644 src/str.php delete mode 100644 tests/str/StrLowerTest.php delete mode 100644 tests/str/StrUpperTest.php diff --git a/.travis.yml b/.travis.yml index 01e10f6..ca4c1d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 7.2 - 7.3 - 7.4 diff --git a/README.md b/README.md index dd55311..be12fb3 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Laravel-specific and pure PHP Helper Functions. | Laravel | Helper Functions | | ------- | :-------------------------------------------------------------------------: | +| 8.x | [8.x](https://github.com/dmitry-ivanov/laravel-helper-functions/tree/8.x) | | 7.x | [7.x](https://github.com/dmitry-ivanov/laravel-helper-functions/tree/7.x) | | 6.x | [6.x](https://github.com/dmitry-ivanov/laravel-helper-functions/tree/6.x) | | 5.8.* | [5.8.*](https://github.com/dmitry-ivanov/laravel-helper-functions/tree/5.8) | @@ -85,10 +86,6 @@ Laravel-specific and pure PHP Helper Functions. - [Json](#json) - [is_json](#is_json) -- [Strings](#strings) - - [str_lower](#str_lower) - - [str_upper](#str_upper) - - [System](#system) - [is_windows_os](#is_windows_os) @@ -435,32 +432,6 @@ is_json('{"foo":1,"bar":2,"baz":3}', true); // ["foo" => 1, "bar" => 2, "baz" => 3] ``` -## Strings - -#### `str_lower()` - -> Deprecated, use the `Illuminate\Support\Str::lower()` instead. - -Convert string to lowercase, assuming it's in the `UTF-8` encoding: - -```php -str_lower('TeSt'); - -// "test" -``` - -#### `str_upper()` - -> Deprecated, use the `Illuminate\Support\Str::upper()` instead. - -Convert string to uppercase, assuming it's in the `UTF-8` encoding: - -```php -str_upper('TeSt'); - -// "TEST" -``` - ## System #### `is_windows_os()` diff --git a/composer.json b/composer.json index 0d7fd1f..008f1da 100644 --- a/composer.json +++ b/composer.json @@ -12,22 +12,22 @@ "email": "dmitry.g.ivanov@gmail.com" }], "require": { - "php": "^7.2.5", + "php": "^7.3", "ext-dom": "*", "ext-json": "*", "ext-simplexml": "*", - "illuminate/support": "^7.0", + "illuminate/support": "^8.0", "nesbot/carbon": "^2.17", - "symfony/filesystem": "^5.0", - "symfony/finder": "^5.0", - "symfony/process": "^5.0", - "symfony/var-dumper": "^5.0", + "symfony/filesystem": "^5.1", + "symfony/finder": "^5.1", + "symfony/process": "^5.1", + "symfony/var-dumper": "^5.1", "spatie/array-to-xml": "^2.7" }, "require-dev": { "phpunit/phpunit": "^8.4|^9.0", "mockery/mockery": "^1.3.1", - "illuminated/testing-tools": "^7.0" + "illuminated/testing-tools": "^8.0" }, "autoload": { "files": [ diff --git a/src/str.php b/src/str.php deleted file mode 100644 index 6378c1a..0000000 --- a/src/str.php +++ /dev/null @@ -1,31 +0,0 @@ -assertEquals('', str_lower('')); - } - - /** @test */ - public function it_lowers_lowercased_string() - { - $this->assertEquals('test', str_lower('test')); - } - - /** @test */ - public function it_lowers_lowercased_sentence() - { - $this->assertEquals('another test', str_lower('another test')); - } - - /** @test */ - public function it_lowers_capitalized_word() - { - $this->assertEquals('test', str_lower('Test')); - } - - /** @test */ - public function it_lowers_mixed_word() - { - $this->assertEquals('test', str_lower('TeSt')); - } - - /** @test */ - public function it_lowers_uppercased_word() - { - $this->assertEquals('test', str_lower('TEST')); - } - - /** @test */ - public function it_lowers_capitalized_sentence() - { - $this->assertEquals('another test', str_lower('Another Test')); - } - - /** @test */ - public function it_lowers_mixed_sentence() - { - $this->assertEquals('another test', str_lower('AnoTHer TeST')); - } - - /** @test */ - public function it_lowers_uppercased_sentence() - { - $this->assertEquals('another test', str_lower('ANOTHER TEST')); - } - - /** @test */ - public function it_lowers_mixed_sentence_with_special_chars() - { - $this->assertEquals('another-test!', str_lower('AnoTHer-TeST!')); - } -} diff --git a/tests/str/StrUpperTest.php b/tests/str/StrUpperTest.php deleted file mode 100644 index adbeae5..0000000 --- a/tests/str/StrUpperTest.php +++ /dev/null @@ -1,68 +0,0 @@ -assertEquals('', str_upper('')); - } - - /** @test */ - public function it_uppers_uppercased_string() - { - $this->assertEquals('TEST', str_upper('TEST')); - } - - /** @test */ - public function it_uppers_uppercased_sentence() - { - $this->assertEquals('ANOTHER TEST', str_upper('ANOTHER TEST')); - } - - /** @test */ - public function it_uppers_capitalized_word() - { - $this->assertEquals('TEST', str_upper('Test')); - } - - /** @test */ - public function it_uppers_mixed_word() - { - $this->assertEquals('TEST', str_upper('TeSt')); - } - - /** @test */ - public function it_uppers_lowercased_word() - { - $this->assertEquals('TEST', str_upper('test')); - } - - /** @test */ - public function it_uppers_capitalized_sentence() - { - $this->assertEquals('ANOTHER TEST', str_upper('Another Test')); - } - - /** @test */ - public function it_uppers_mixed_sentence() - { - $this->assertEquals('ANOTHER TEST', str_upper('AnoTHer TeST')); - } - - /** @test */ - public function it_uppers_lowercased_sentence() - { - $this->assertEquals('ANOTHER TEST', str_upper('another test')); - } - - /** @test */ - public function it_uppers_mixed_sentence_with_special_chars() - { - $this->assertEquals('ANOTHER-TEST!', str_upper('AnoTHer-TeST!')); - } -}