Skip to content

Commit

Permalink
Merge pull request #25 from Icinga/fix-autoloading
Browse files Browse the repository at this point in the history
Fix autoloading
  • Loading branch information
nilmerg authored Oct 27, 2023
2 parents 71c4555 + b89aa9d commit 42dff4b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 58 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/clean-vendor.yml

This file was deleted.

6 changes: 0 additions & 6 deletions bin/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ rm -rf vendor
git checkout vendor
composer validate --no-check-all --strict || fail "Composer validate failed"

UNKNOWN_VENDOR_FILES=$(find vendor -maxdepth 1 -type d -not -name "ipl" -not -name "fortawesome" -not -name "composer" -not -name "vendor")
if [ -n "$UNKNOWN_VENDOR_FILES" ]; then
echo "Unknown vendor files found! DO NOT TAG!"
exit 1
fi

if [ -z "$NO_OPT" ]; then
git tag -a v$VERSION -m "Version v$VERSION"
echo "Finished, tagged v$VERSION"
Expand Down
23 changes: 15 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@
"sort-packages": true,
"platform": {
"php": "7.2.9"
},
"allow-plugins": {
"cweagans/composer-patches": true
}
},
"repositories": [
{
"type": "path",
"url": "./replacer"
}
],
"require": {
"php": ">=7.2",
"repl/acer": "@dev",
"ipl/html": "^0.8.0",
"ipl/i18n": "^0.2.0",
"ipl/orm": "^0.6.0",
"ipl/scheduler": "^0.1.0",
"ipl/sql": "^0.7.0",
"ipl/stdlib": "^0.13.0",
"ipl/validator": "^0.5.0",
"ipl/web": "^0.9.0"
"ipl/web": "^0.9.0",
"cweagans/composer-patches": "~1.0"
},
"require-dev": {
},
"autoload": {
"psr-0": { "AssetLoader": "" }
Expand All @@ -35,5 +34,13 @@
"post-update-cmd": [
"AssetLoader::update"
]
},
"extra": {
"composer-exit-on-patch-failure": true,
"patches": {
"ramsey/collection": {
"Collection: Add PHP 8.1 support": "patches/ramsey-collection.patch"
}
}
}
}
37 changes: 37 additions & 0 deletions patches/ramsey-collection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--- a/vendor/ramsey/collection/src/AbstractArray.php
+++ b/vendor/ramsey/collection/src/AbstractArray.php
@@ -84,6 +84,7 @@ abstract class AbstractArray implements ArrayInterface
* @return T|null the value stored at the offset, or null if the offset
* does not exist.
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->data[$offset] ?? null;
@@ -132,6 +133,11 @@ abstract class AbstractArray implements ArrayInterface
return serialize($this->data);
}

+ public function __serialize()
+ {
+ return $this->serialize();
+ }
+
/**
* Converts a serialized string representation into an instance object.
*
@@ -149,6 +155,11 @@ abstract class AbstractArray implements ArrayInterface
$this->data = $data;
}

+ public function __unserialize(array $data)
+ {
+ $this->unserialize($data);
+ }
+
/**
* Returns the number of items in this array.
*
--
2.41.0

18 changes: 0 additions & 18 deletions replacer/composer.json

This file was deleted.

0 comments on commit 42dff4b

Please sign in to comment.