Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot declare class Config\ShieldOAuthConfig, because the name is already in use #120

Closed
nicojmb opened this issue Jun 27, 2024 · 3 comments

Comments

@nicojmb
Copy link

nicojmb commented Jun 27, 2024

PHP Version

8.3.8

CodeIgniter4 Version

4.5.3

Shield Version

v1.1.0

Shield OAuth Version?

dev-develop

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MariaDB 10.5.24

Did you add customize OAuth?

No

What happened?

Cannot declare class Config\ShieldOAuthConfig, because the name is already in use

Steps to Reproduce

Upgrade to latest CI4 4.5.3 and add this to composer.json (this is suggested by upgrade guide)

"psr-4": {
            "App\\": "app/",
            "Config\\": "app/Config"
        },

Expected Output

not show the redeclare error.

Anything else?

if remove this psr-4, all works fine.

@nicojmb nicojmb added the bug Something isn't working label Jun 27, 2024
@nicojmb nicojmb changed the title Bug: Bug: Cannot declare class Config\ShieldOAuthConfig, because the name is already in use Jun 27, 2024
@datamweb
Copy link
Owner

datamweb commented Jun 27, 2024

@nicojmb ,Thank you for your report.

I installed CI4.5.3 + Shield 1.1.0 and shield-oauth dev-develop. My composer.json is as follows:

    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Config\\": "app/Config"
        },
        "exclude-from-classmap": [
            "**/Database/Migrations/**"
        ]
    },

But unfortunately I could not reproduce your problem.

Please make sure that changes PR 8745 are applied to your project. If the code is updated, Please provide more details to reproduce this problem.

@datamweb datamweb added waiting for info Issues or pull requests that need further clarification from the author and removed bug Something isn't working labels Jun 28, 2024
@nicojmb
Copy link
Author

nicojmb commented Jul 1, 2024

Sorry for the delay, the error occurs with the custom library "MicrosoftOAuth.php".

I fixed there.

@datamweb datamweb removed the waiting for info Issues or pull requests that need further clarification from the author label Jul 1, 2024
@datamweb
Copy link
Owner

datamweb commented Jul 1, 2024

Thanks for the reply.

@datamweb datamweb closed this as completed Jul 1, 2024
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

No branches or pull requests

2 participants