Skip to content

[Finder] Get filename without extension #30664

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

Merged

Conversation

antonch1989
Copy link
Contributor

@antonch1989 antonch1989 commented Mar 24, 2019

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #30655
License MIT
Doc PR

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this contribution, please fix the table in the PR header, because this is no bugfix, but a feature.

@nicolas-grekas nicolas-grekas added this to the next milestone Mar 25, 2019
Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's a minor comment.

@fabpot fabpot force-pushed the issue-30655-filename-without-extension branch from 137f287 to 821e55a Compare March 27, 2019 08:36
@fabpot
Copy link
Member

fabpot commented Mar 27, 2019

Thank you @antonch1989.

@fabpot fabpot merged commit 821e55a into symfony:master Mar 27, 2019
fabpot added a commit that referenced this pull request Mar 27, 2019
This PR was squashed before being merged into the 4.3-dev branch (closes #30664).

Discussion
----------

[Finder] Get filename without extension

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30655
| License       | MIT
| Doc PR        |

Commits
-------

821e55a [Finder] Get filename without extension
@OskarStark
Copy link
Contributor

Thank you for this contribution, can you please add some documentation for this new feature?

@javiereguiluz
Copy link
Member

I find this method confusing. It's called getFilenameWithoutExtension() but sometimes it returns the filename + extension:

getFilenameWithoutExtension('foo.html');      // foo
getFilenameWithoutExtension('foo.html.twig'); // foo.html
getFilenameWithoutExtension('foo.tar.gz');    // foo.tar

I expected foo as the returned value in all cases.

@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants