Skip to content

Fix function redeclare fatal error#114

Merged
rtheunissen merged 1 commit into
php-ds:masterfrom
SerafimArts:master
May 17, 2026
Merged

Fix function redeclare fatal error#114
rtheunissen merged 1 commit into
php-ds:masterfrom
SerafimArts:master

Conversation

@SerafimArts
Copy link
Copy Markdown
Contributor

@SerafimArts SerafimArts commented May 17, 2026

Closes #113

P.S. Temporary solution that used this fix:

// composer.json
{
    // Add a repository that overrides the package's info
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "php-ds/php-ds",
                "version": "2.0.1",
                "require": {
                    "php": ">=8.2"
                },
                "autoload": {
                    "psr-4": {
                        "Ds\\": "src"
                    },
                    "files": [
                        "src/functions.php"
                    ]
                },
                "dist": {
                    "url": "https://github.com/SerafimArts/polyfill/archive/ddde872560a51cf8916c054b19e0b3f0f537ac59.zip",
                    "type": "zip"
                }
            }
        }
    ],
    // ...
    "require": {
        // ...
        "php-ds/php-ds": "^2.0.1"
    }
}

@rtheunissen rtheunissen merged commit 890702a into php-ds:master May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Fatal error: Cannot redeclare function" when using polyfill and extension together (2.0)

3 participants