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

isLumen() fixes #384

Merged
merged 1 commit into from
Feb 20, 2018
Merged

isLumen() fixes #384

merged 1 commit into from
Feb 20, 2018

Conversation

0xb4lint
Copy link

@0xb4lint 0xb4lint commented Feb 20, 2018

isLumen() regex was invalid and it should be used too where isLaravel() is used
Please merge to 2.5 and 2.6 branches.

@jgrossi
Copy link
Member

jgrossi commented Feb 20, 2018

Hi @valentinxxx thanks for the PR. Actually I just figured out that isLumen() is not being used. Maybe we could include the isLumen() logic into isLaravel(). There's no place where isLumen() is called without isLaravel(). Maybe something like:

public static function isLaravel()
{
    return function_exists('app') &&
        (app() instanceof Application ||
            preg_match('/^Lumen/', app()->version()) === 1);
}

What do you think?

@0xb4lint
Copy link
Author

@jgrossi You're right. I've modified the code and also replaced preg_match() with strpos()

@jgrossi
Copy link
Member

jgrossi commented Feb 20, 2018

@valentinxxx thank you! and thanks for contributing! 😎

@jgrossi jgrossi merged commit 73bac86 into corcel:2.5 Feb 20, 2018
@jgrossi
Copy link
Member

jgrossi commented Feb 20, 2018

@valentinxxx merged into 2.6 as well and created new release for both versions 🎉🍻

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.

None yet

2 participants