Permalink
Browse files

strict psr-4 structure

flat yourls packages
ref http://www.php-fig.org/psr/psr-4/
  • Loading branch information...
LeoColomb committed Nov 28, 2017
1 parent 7e2d555 commit c8ad874cdf32997df8a793baffd403bffa04596e
View
@@ -32,7 +32,7 @@
},
"autoload": {
"psr-4": {
"YOURLS\\": "includes/YOURLS"
"YOURLS\\": "includes/"

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Dec 2, 2017

Member

j'aimais bien le concept d'avoir includes/YOURLS pour tous les trucs maison, et includes/vendor pour tous les trucs 3rd party...

@ozh

ozh Dec 2, 2017

Member

j'aimais bien le concept d'avoir includes/YOURLS pour tous les trucs maison, et includes/vendor pour tous les trucs 3rd party...

This comment has been minimized.

Show comment
Hide comment
@LeoColomb

LeoColomb Dec 2, 2017

Member

OK, vendor, for sure, but for YOURLS it's quite redundant:

  • We work in the project YOURLS (the package)
  • We are in includes which should the source of the package

Actually, the thing is vendor should not be included in includes, but preferably at the top level, to distinguish it from package sources.

@LeoColomb

LeoColomb Dec 2, 2017

Member

OK, vendor, for sure, but for YOURLS it's quite redundant:

  • We work in the project YOURLS (the package)
  • We are in includes which should the source of the package

Actually, the thing is vendor should not be included in includes, but preferably at the top level, to distinguish it from package sources.

This comment has been minimized.

Show comment
Hide comment
@LeoColomb

LeoColomb Dec 2, 2017

Member

Ben enfin si ça te plait vraiment pas, je peux revert. Je suis peut-être allé un peu vite là-dessus.

@LeoColomb

LeoColomb Dec 2, 2017

Member

Ben enfin si ça te plait vraiment pas, je peux revert. Je suis peut-être allé un peu vite là-dessus.

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Dec 2, 2017

Member

Nah, nothing important, that's just cosmetic stuff. Leave it as is :)

@ozh

ozh Dec 2, 2017

Member

Nah, nothing important, that's just cosmetic stuff. Leave it as is :)

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Dec 2, 2017

Member

This said, now this isn't working anymore on my test install, there's now an extra dirname() since you moved everything up a directory.

But this said again, maybe this dirname() cascade is dumb in itself. See my comment on #2314 (comment)

@ozh

ozh Dec 2, 2017

Member

This said, now this isn't working anymore on my test install, there's now an extra dirname() since you moved everything up a directory.

But this said again, maybe this dirname() cascade is dumb in itself. See my comment on #2314 (comment)

}
},
"suggest": {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,7 +6,7 @@
$baseDir = dirname(dirname($vendorDir));
return array(
'YOURLS\\' => array($baseDir . '/includes/YOURLS'),
'YOURLS\\' => array($baseDir . '/includes'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'POMO\\' => array($vendorDir . '/pomo/pomo/src'),
'MaxMind\\WebService\\' => array($vendorDir . '/maxmind/web-service-common/src/WebService'),
@@ -47,7 +47,7 @@ class ComposerStaticInit2d6d15a8f6cc4bfbfd4a2943a6c4df59
public static $prefixDirsPsr4 = array (
'YOURLS\\' =>
array (
0 => __DIR__ . '/../../..' . '/includes/YOURLS',
0 => __DIR__ . '/../../..' . '/includes',
),
'Symfony\\Polyfill\\Mbstring\\' =>
array (
@@ -40,7 +40,14 @@ Basic usage
```php
$curl = curl_init("https://example.org/");
curl_setopt($curl, CURLOPT_CAINFO, \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath());
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
curl_setopt($curl, CURLOPT_CAPATH, $caPathOrFile);
} else {
curl_setopt($curl, CURLOPT_CAINFO, $caPathOrFile);
}
$result = curl_exec($curl);
```
@@ -53,11 +60,11 @@ $opts = array(
)
);
$caPath = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPath)) {
$opts['ssl']['capath'] = $caPath;
$caPathOrFile = \Composer\CaBundle\CaBundle::getSystemCaRootBundlePath();
if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile)))) {
$opts['ssl']['capath'] = $caPathOrFile;
} else {
$opts['ssl']['cafile'] = $caPath;
$opts['ssl']['cafile'] = $caPathOrFile;
}
$context = stream_context_create($opts);

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -196,67 +196,6 @@
"translation"
]
},
{
"name": "composer/ca-bundle",
"version": "1.0.7",
"version_normalized": "1.0.7.0",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12",
"reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12",
"shasum": ""
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0"
},
"suggest": {
"symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+"
},
"time": "2017-03-06T11:59:08+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
]
},
{
"name": "maxmind/web-service-common",
"version": "v0.4.0",
@@ -566,5 +505,66 @@
"portable",
"shim"
]
},
{
"name": "composer/ca-bundle",
"version": "1.0.9",
"version_normalized": "1.0.9.0",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "36344aeffdc37711335563e6108cda86566432a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/36344aeffdc37711335563e6108cda86566432a6",
"reference": "36344aeffdc37711335563e6108cda86566432a6",
"shasum": ""
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0"
},
"suggest": {
"symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+"
},
"time": "2017-11-13T15:51:25+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
]
}
]

0 comments on commit c8ad874

Please sign in to comment.