Skip to content

Commit

Permalink
Merge pull request #31 from sudiptpa/fix/composer-autoload-psr-4
Browse files Browse the repository at this point in the history
Added fix for composer 2.0
  • Loading branch information
sudiptpa authored Aug 8, 2020
2 parents b6064bf + ce6dcf9 commit 270fb4d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 40 deletions.
89 changes: 49 additions & 40 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,52 @@
{
"name": "sudiptpa/guid",
"description": "A Simple GUID generator Package for PHP.",
"license": "MIT",
"type": "library",
"keywords": [
"guid"
],
"authors": [
{
"name": "Sujip Thapa",
"email": "sudiptpa@gmail.com",
"homepage": "https://sujipthapa.co",
"role": "Senior Developer"
}
],
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~1.0"
},
"autoload": {
"psr-4": {
"Sujip\\Guid\\": "src/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
},
"laravel": {
"providers": [
"Sujip\\Guid\\GuidServiceProvider"
],
"aliases": {
"Guid": "Sujip\\Guid\\Facades\\Guid"
}
}
"name": "sudiptpa/guid",
"type": "library",
"description": "A Simple GUID generator Package for PHP.",
"homepage": "https://github.com/sudiptpa/guid",
"keywords": [
"guid"
],
"license": "MIT",
"authors": [
{
"email": "sudiptpa@gmail.com",
"homepage": "https://sujipthapa.co",
"name": "Sujip Thapa",
"role": "Web Developer"
}
],
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Sujip\\Guid\\": "src/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
},
"laravel": {
"aliases": {
"Guid": "Sujip\\Guid\\Facades\\Guid"
},
"providers": [
"Sujip\\Guid\\GuidServiceProvider"
]
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~1.0"
},
"support": {
"issues": "https://github.com/sudiptpa/guid/issues",
"rss": "https://github.com/sudiptpa/guid/releases.atom",
"source": "https://github.com/sudiptpa/guid"
}
}
File renamed without changes.
1 change: 1 addition & 0 deletions src/Sujip/Guid/Guid.php → src/Guid.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function create($trim = true)
$data = openssl_random_pseudo_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10

return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 270fb4d

Please sign in to comment.