From 340056dc4776d81e6b0cf61ffea4e947cfa8bf3b Mon Sep 17 00:00:00 2001 From: Cameron Bryers <12287346+Cambis@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:54:57 +1300 Subject: [PATCH] MNT Update classes to be PSR-4 compliant - update autoload config in composer.json - update namespaces for classes in tests/SegmentFieldModifier to match path - add .gitatrributes file :wrench: chore revert config and autoload-dev changes in composer.json --- .gitattributes | 5 +++++ .gitignore | 1 + composer.json | 6 +++--- tests/SegmentFieldModifier/IDSegmentFieldModifierTest.php | 2 +- tests/SegmentFieldModifier/SlugSegmentFieldModifierTest.php | 2 +- tests/SegmentFieldTest.php | 1 - 6 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4718dc9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +/tests export-ignore +/client/src export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.github export-ignore diff --git a/.gitignore b/.gitignore index b1d62d5..649b0db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules vendor composer.lock +.phpunit.result.cache diff --git a/composer.json b/composer.json index ffb44df..eb3cfa9 100644 --- a/composer.json +++ b/composer.json @@ -30,10 +30,10 @@ }, "autoload": { "psr-4": { - "SilverStripe\\Forms\\": "code/", - "SilverStripe\\Forms\\Tests\\": "tests/" + "SilverStripe\\Forms\\": "src/", + "SilverStripe\\Forms\\Tests\\": "tests/" } }, "minimum-stability": "dev", "prefer-stable": true -} \ No newline at end of file +} diff --git a/tests/SegmentFieldModifier/IDSegmentFieldModifierTest.php b/tests/SegmentFieldModifier/IDSegmentFieldModifierTest.php index b64b01a..55e58e8 100644 --- a/tests/SegmentFieldModifier/IDSegmentFieldModifierTest.php +++ b/tests/SegmentFieldModifier/IDSegmentFieldModifierTest.php @@ -1,6 +1,6 @@