diff --git a/app/Models/CustomField.php b/app/Models/CustomField.php index f3ef7bc2bf..3a5753b0a2 100644 --- a/app/Models/CustomField.php +++ b/app/Models/CustomField.php @@ -326,7 +326,7 @@ class CustomField extends Model * * @author [A. Gianotto] [] * @since [v3.4] - * @return boolean + * @return string */ public function convertUnicodeDbSlug($original = null) { @@ -336,7 +336,7 @@ class CustomField extends Model if (!function_exists('transliterator_transliterate')) { $long_slug = '_snipeit_' . str_slug(\Patchwork\Utf8::utf8_encode(trim($name)), '_'); } else { - $long_slug = '_snipeit_' . str_slug($name, '_'); + $long_slug = '_snipeit_' . Utf8Slugger::slugify($name, '_'); } return substr($long_slug, 0, 50) . '_' . $id; diff --git a/composer.json b/composer.json index d64374ef10..6eac009195 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,7 @@ "fideloper/proxy": "^4.3", "guzzlehttp/guzzle": "^6.5", "intervention/image": "^2.5", + "javiereguiluz/easyslugger": "^1.0", "laravel/framework": "^6.0", "laravel/helpers": "^1.2", "laravel/passport": "^8.4", @@ -58,6 +59,8 @@ }, "require-dev": { "codeception/codeception": "^4.1", + "codeception/module-asserts": "^1.2", + "codeception/module-laravel5": "^1.1", "fzaninotto/faker": "^1.9", "phpunit/php-token-stream": "^3.1", "phpunit/phpunit": "^8.5", diff --git a/composer.lock b/composer.lock index e4c95877cd..6f3d7f278e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "afcf0b12b229db5b83bd695b37f163f1", + "content-hash": "8be1f8567a455103ed5e1f0a14314108", "packages": [ { "name": "adldap2/adldap2", @@ -119,16 +119,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.135.0", + "version": "3.135.1", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "254f168f90b1846ffb3f70594280e66b9f10a85e" + "reference": "59587a4f3fc88b36ce7f2e1a102bfcd7a816b27c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/254f168f90b1846ffb3f70594280e66b9f10a85e", - "reference": "254f168f90b1846ffb3f70594280e66b9f10a85e", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/59587a4f3fc88b36ce7f2e1a102bfcd7a816b27c", + "reference": "59587a4f3fc88b36ce7f2e1a102bfcd7a816b27c", "shasum": "" }, "require": { @@ -199,7 +199,7 @@ "s3", "sdk" ], - "time": "2020-04-20T18:16:34+00:00" + "time": "2020-04-21T18:14:29+00:00" }, { "name": "bacon/bacon-qr-code", @@ -1928,6 +1928,36 @@ ], "time": "2019-11-02T09:15:47+00:00" }, + { + "name": "javiereguiluz/easyslugger", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/javiereguiluz/EasySlugger.git", + "reference": "11524a3fd70e3f0c98043755a0ffa228f2529211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/javiereguiluz/EasySlugger/zipball/11524a3fd70e3f0c98043755a0ffa228f2529211", + "reference": "11524a3fd70e3f0c98043755a0ffa228f2529211", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "EasySlugger\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A fast and easy to use slugger with full UTF-8 support.", + "time": "2015-04-12T19:57:10+00:00" + }, { "name": "laminas/laminas-diactoros", "version": "2.2.3", @@ -2066,16 +2096,16 @@ }, { "name": "laravel/framework", - "version": "v6.18.8", + "version": "v6.18.10", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "852c91c46adfbc2f5a0f6985cba3d7b7a769b773" + "reference": "9177744ccdd8d5db970fdff2383fe89c2e94aabe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/852c91c46adfbc2f5a0f6985cba3d7b7a769b773", - "reference": "852c91c46adfbc2f5a0f6985cba3d7b7a769b773", + "url": "https://api.github.com/repos/laravel/framework/zipball/9177744ccdd8d5db970fdff2383fe89c2e94aabe", + "reference": "9177744ccdd8d5db970fdff2383fe89c2e94aabe", "shasum": "" }, "require": { @@ -2208,7 +2238,7 @@ "framework", "laravel" ], - "time": "2020-04-15T20:56:03+00:00" + "time": "2020-04-21T18:53:10+00:00" }, { "name": "laravel/helpers", @@ -2265,16 +2295,16 @@ }, { "name": "laravel/passport", - "version": "v8.4.3", + "version": "v8.4.4", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "edb9ccb9993ca98c7347da2fae20e1b8b4895f31" + "reference": "dd4b1d96eb1fe556a6eb2c55c942360364aa02c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/edb9ccb9993ca98c7347da2fae20e1b8b4895f31", - "reference": "edb9ccb9993ca98c7347da2fae20e1b8b4895f31", + "url": "https://api.github.com/repos/laravel/passport/zipball/dd4b1d96eb1fe556a6eb2c55c942360364aa02c1", + "reference": "dd4b1d96eb1fe556a6eb2c55c942360364aa02c1", "shasum": "" }, "require": { @@ -2334,7 +2364,7 @@ "oauth", "passport" ], - "time": "2020-03-31T15:48:43+00:00" + "time": "2020-04-21T19:24:59+00:00" }, { "name": "laravel/slack-notification-channel", @@ -7818,6 +7848,161 @@ ], "time": "2020-04-17T18:20:46+00:00" }, + { + "name": "codeception/lib-innerbrowser", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/Codeception/lib-innerbrowser.git", + "reference": "2123542b1325cc349ac68868abe74638bcb32ab6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/lib-innerbrowser/zipball/2123542b1325cc349ac68868abe74638bcb32ab6", + "reference": "2123542b1325cc349ac68868abe74638bcb32ab6", + "shasum": "" + }, + "require": { + "codeception/codeception": "*@dev", + "php": ">=5.6.0 <8.0", + "symfony/browser-kit": ">=2.7 <6.0", + "symfony/dom-crawler": ">=2.7 <6.0" + }, + "conflict": { + "codeception/codeception": "<4.0" + }, + "require-dev": { + "codeception/util-universalframework": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk", + "email": "davert@mail.ua", + "homepage": "http://codegyre.com" + }, + { + "name": "Gintautas Miselis" + } + ], + "description": "Parent library for all Codeception framework modules and PhpBrowser", + "homepage": "http://codeception.com/", + "keywords": [ + "codeception" + ], + "time": "2020-02-20T14:46:50+00:00" + }, + { + "name": "codeception/module-asserts", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/Codeception/module-asserts.git", + "reference": "79f13d05b63f2fceba4d0e78044bab668c9b2a6b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/79f13d05b63f2fceba4d0e78044bab668c9b2a6b", + "reference": "79f13d05b63f2fceba4d0e78044bab668c9b2a6b", + "shasum": "" + }, + "require": { + "codeception/codeception": "*@dev", + "codeception/lib-asserts": "^1.12.0", + "php": ">=5.6.0 <8.0" + }, + "conflict": { + "codeception/codeception": "<4.0" + }, + "require-dev": { + "codeception/util-robohelpers": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk" + }, + { + "name": "Gintautas Miselis" + } + ], + "description": "Codeception module containing various assertions", + "homepage": "http://codeception.com/", + "keywords": [ + "assertions", + "asserts", + "codeception" + ], + "time": "2020-04-20T07:26:11+00:00" + }, + { + "name": "codeception/module-laravel5", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/Codeception/module-laravel5.git", + "reference": "419c382fde8a6b2110001fa0a206ec4cdb77c6d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/module-laravel5/zipball/419c382fde8a6b2110001fa0a206ec4cdb77c6d4", + "reference": "419c382fde8a6b2110001fa0a206ec4cdb77c6d4", + "shasum": "" + }, + "require": { + "codeception/codeception": "^4.0", + "codeception/lib-innerbrowser": "^1.0", + "php": ">=5.6.0 <8.0" + }, + "require-dev": { + "codeception/module-asserts": "^1.0", + "codeception/module-rest": "^1.0", + "codeception/util-robohelpers": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan-Henk Gerritsen" + }, + { + "name": "Michael Bodnarchuk" + } + ], + "description": "Codeception module for Laravel 5 framework", + "homepage": "http://codeception.com/", + "keywords": [ + "codeception", + "laravel5" + ], + "time": "2020-03-28T14:59:53+00:00" + }, { "name": "codeception/phpunit-wrapper", "version": "8.1.2", @@ -7942,215 +8127,6 @@ ], "time": "2019-12-12T13:22:17+00:00" }, - { - "name": "guzzle/guzzle", - "version": "v3.8.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", - "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": ">=2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - "require-dev": { - "doctrine/cache": "*", - "monolog/monolog": "1.*", - "phpunit/phpunit": "3.7.*", - "psr/log": "1.0.*", - "symfony/class-loader": "*", - "zendframework/zend-cache": "<2.3", - "zendframework/zend-log": "<2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.8-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "abandoned": "guzzlehttp/guzzle", - "time": "2014-01-28T22:29:15+00:00" - }, - { - "name": "league/flysystem-rackspace", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem-rackspace.git", - "reference": "ba877e837f5dce60e78a0555de37eb9bfc7dd6b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-rackspace/zipball/ba877e837f5dce60e78a0555de37eb9bfc7dd6b9", - "reference": "ba877e837f5dce60e78a0555de37eb9bfc7dd6b9", - "shasum": "" - }, - "require": { - "league/flysystem": "~1.0", - "php": ">=5.4.0", - "rackspace/php-opencloud": "~1.16" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\Rackspace\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Flysystem adapter for Rackspace", - "time": "2016-03-11T12:13:42+00:00" - }, - { - "name": "league/flysystem-sftp", - "version": "1.0.22", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem-sftp.git", - "reference": "cab59dd2277e02fe46f5f23195672a02ed49774d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/cab59dd2277e02fe46f5f23195672a02ed49774d", - "reference": "cab59dd2277e02fe46f5f23195672a02ed49774d", - "shasum": "" - }, - "require": { - "league/flysystem": "~1.0", - "php": ">=5.6.0", - "phpseclib/phpseclib": "~2.0" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "^5.7.25" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\Flysystem\\Sftp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Flysystem adapter for SFTP", - "time": "2019-10-16T20:05:49+00:00" - }, - { - "name": "mikemccabe/json-patch-php", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/mikemccabe/json-patch-php.git", - "reference": "b3af30a6aec7f6467c773cd49b2d974a70f7c0d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mikemccabe/json-patch-php/zipball/b3af30a6aec7f6467c773cd49b2d974a70f7c0d4", - "reference": "b3af30a6aec7f6467c773cd49b2d974a70f7c0d4", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "mikemccabe\\JsonPatch\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "description": "Produce and apply json-patch objects", - "time": "2015-01-05T21:19:54+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.9.5", @@ -8636,63 +8612,6 @@ ], "time": "2020-03-31T08:52:04+00:00" }, - { - "name": "rackspace/php-opencloud", - "version": "v1.16.0", - "source": { - "type": "git", - "url": "https://github.com/rackspace/php-opencloud.git", - "reference": "d6b71feed7f9e7a4b52e0240a79f06473ba69c8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rackspace/php-opencloud/zipball/d6b71feed7f9e7a4b52e0240a79f06473ba69c8c", - "reference": "d6b71feed7f9e7a4b52e0240a79f06473ba69c8c", - "shasum": "" - }, - "require": { - "guzzle/guzzle": "~3.8", - "mikemccabe/json-patch-php": "~0.1", - "php": ">=5.4", - "psr/log": "~1.0" - }, - "require-dev": { - "apigen/apigen": "~4.0", - "fabpot/php-cs-fixer": "1.0.*@dev", - "jakub-onderka/php-parallel-lint": "0.*", - "phpspec/prophecy": "~1.4", - "phpunit/phpunit": "4.3.*", - "satooshi/php-coveralls": "0.6.*@dev" - }, - "type": "library", - "autoload": { - "psr-0": { - "OpenCloud": [ - "lib/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Jamie Hannaford", - "email": "jamie.hannaford@rackspace.com", - "homepage": "https://github.com/jamiehannaford" - } - ], - "description": "PHP SDK for Rackspace/OpenStack APIs", - "keywords": [ - "Openstack", - "nova", - "opencloud", - "rackspace", - "swift" - ], - "time": "2016-01-29T10:34:57+00:00" - }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -9068,6 +8987,79 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "symfony/browser-kit", + "version": "v4.4.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "e4b0dc1b100bf75b5717c5b451397f230a618a42" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/e4b0dc1b100bf75b5717c5b451397f230a618a42", + "reference": "e4b0dc1b100bf75b5717c5b451397f230a618a42", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/dom-crawler": "^3.4|^4.0|^5.0" + }, + "require-dev": { + "symfony/css-selector": "^3.4|^4.0|^5.0", + "symfony/http-client": "^4.3|^5.0", + "symfony/mime": "^4.3|^5.0", + "symfony/process": "^3.4|^4.0|^5.0" + }, + "suggest": { + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony BrowserKit Component", + "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-03-28T10:15:50+00:00" + }, { "name": "symfony/dom-crawler", "version": "v4.4.7",