Skip to content

fix: directory separator from routing file. - #7487

Merged
kenjis merged 1 commit into
codeigniter4:4.4from
ping-yee:fix-dir-separator
May 14, 2023
Merged

kenjis merged 1 commit into
codeigniter4:4.4from
ping-yee:fix-dir-separator

Conversation

@ping-yee

@ping-yee ping-yee commented May 8, 2023

Copy link
Copy Markdown
Contributor

Description
Fixes #7474

Normalize the route path.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Comment thread app/Config/Routing.php Outdated
@lonnieezell

Copy link
Copy Markdown
Member

Have you checked this on Windows and verified that realpath() will actually solve the problem?

@ping-yee

Copy link
Copy Markdown
Contributor Author

Have you checked this on Windows and verified that realpath() will actually solve the problem?

Yep, I can pass the test cases on Windows (Linux also) with using realpath() to normalize the route path.

@ping-yee

ping-yee commented May 10, 2023

Copy link
Copy Markdown
Contributor Author

In Windows, the route path will be:

D:\project\github\CodeIgniter4\app\Config/Routes.php <= before handle normalize work with realpath()

D:\project\github\CodeIgniter4\app\Config\Routes.php <= after handled with realpath()

In Linux, the route path will not be changed after handled by realpath():

/mnt/d/project/github/CodeIgniter4/app/Config/Routes.php

@lonnieezell

@kenjis kenjis changed the title fix: fix the directory separator from routing file. fix: directory separator from routing file. May 12, 2023
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label May 12, 2023

@kenjis kenjis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@kenjis
kenjis merged commit 38e0b6e into codeigniter4:4.4 May 14, 2023
@ping-yee
ping-yee deleted the fix-dir-separator branch June 13, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants