Skip to content

Commit

Permalink
pickFiles - Convert "UpgradeSnapshots" to PSR-4 autoloading
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Jul 21, 2022
1 parent 8ade0d3 commit dbb8802
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"bin": [
"bin/civicrm-upgrade-test"
],
"autoload": {
"psr-4": {"Civi\\UpgradeTest\\": "src/"}
},
"authors": [
{
"name": "Tim Otten",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/ParseFilterTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Civi\UpgradeTest;

require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'util' . DIRECTORY_SEPARATOR . 'pickFiles.lib.php';
require_once dirname(__DIR__) . '/vendor/autoload.php';
global $assertionCount;
$assertionCount = ['ok' => 0, 'fail' => 0];

Expand Down
3 changes: 2 additions & 1 deletion util/pickFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<?php
namespace Civi\UpgradeTest;

require_once dirname(__DIR__) . '/vendor/autoload.php';

main($argv);

function help($error = NULL) {
Expand All @@ -20,7 +22,6 @@ function help($error = NULL) {
}

function main($args) {
require_once __DIR__ . DIRECTORY_SEPARATOR . 'pickFiles.lib.php';
$prog = array_shift($args);
if (empty($args)) {
help("Missing required argument <fileExpr>\n");
Expand Down

0 comments on commit dbb8802

Please sign in to comment.