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

Support composer in PHP7 mode #7869

Closed
4 tasks done
fredemmott opened this issue Jun 6, 2017 · 3 comments
Closed
4 tasks done

Support composer in PHP7 mode #7869

fredemmott opened this issue Jun 6, 2017 · 3 comments
Assignees

Comments

@fredemmott
Copy link
Contributor

fredemmott commented Jun 6, 2017

  • RecursiveDirectoryIterator/SplFileInfo/dirname() throws an exception
  • Add to HHVM test suite
  • fix new FilesystemIterator($spl_file_info)
  • fix bad tar checksum calculation: phardata implementation thought that unpack('C*') gave single-char strings, but it actually gives uint8s; phardata implementation then passes them to ord() which complains
@fredemmott fredemmott self-assigned this Jun 6, 2017
hhvm-bot pushed a commit that referenced this issue Jun 7, 2017
Summary:
Fixes 'composer require' in the basic case. Not thoroughly tested composer, but this /might/ unblock most people.

refs #7869
refs #7281 (not a complete fix - there's somre more invasive changes needed)

Reviewed By: mofarrell

Differential Revision: D5196198

fbshipit-source-id: 05627f58dc22e69a4af44d329395cfd635030e5c
hhvm-bot pushed a commit that referenced this issue Jun 8, 2017
Summary:
99.09% pass, a few more symfony-passing-things-that-aren't-strings problems
similar to the SplFileInfo/dirname one though.

refs #7869

Depends on D5196198

Reviewed By: mofarrell

Differential Revision: D5202473

fbshipit-source-id: e4e266c68075c83588771442f3aa7904d308d00b
hhvm-bot pushed a commit that referenced this issue Jun 8, 2017
Summary:
Used by parts of symfony that composer users when creating zips/tars/phars

refs #7869

Depends on D5202473

Reviewed By: paulbiss

Differential Revision: D5202739

fbshipit-source-id: b0a935bb56ec41425fefad6aa87be7a28fc3a4ec
hhvm-bot pushed a commit that referenced this issue Jun 8, 2017
Summary:
`unpack('C*')` returns `array<int>`, but the code thought it returned
`array<single-char-string>` then called `ord()` on each value. `ord()` requires
string parameters.

 - In PHP5 mode, this created incorrect checksums - we just want to add the int
   value to the checksum, but were adding `ord(substr((string) $int, 0, 1))`
 - In PHP7 mode, this throws a type error

gets composer to 99.9%

refs #7869

Depends on D5202739

Reviewed By: paulbiss

Differential Revision: D5202974

fbshipit-source-id: cb1b8157c316a6c8c70408654bacf033e51e98f3
@fredemmott
Copy link
Contributor Author

fredemmott commented Jun 8, 2017

All done, hopefully will be backported to 3.20.2

@mofarrell
Copy link
Contributor

working on that

@hopeseekr
Copy link

This issue is needed, because *WE ARE NOT IN A PHP5 WORLD ANY LONGER.

The HHVM team, and Facebook Corp., need to be galvanized to committing to stay compatible with PHP7 or they need to break all pretenses and start marking Hack Language as its own thing.

Otherwise, once all PHP5 code is collecting dust, relatively soon, all of your, my, and their HHVM efforts will have been in vain!

Hopefully this PR is a wakeup call!

mofarrell pushed a commit that referenced this issue Jun 9, 2017
Summary:
Fixes 'composer require' in the basic case. Not thoroughly tested composer, but this /might/ unblock most people.

refs #7869
refs #7281 (not a complete fix - there's somre more invasive changes needed)

Reviewed By: mofarrell

Differential Revision: D5196198

fbshipit-source-id: 05627f58dc22e69a4af44d329395cfd635030e5c
mofarrell pushed a commit that referenced this issue Jun 9, 2017
Summary:
99.09% pass, a few more symfony-passing-things-that-aren't-strings problems
similar to the SplFileInfo/dirname one though.

refs #7869

Depends on D5196198

Reviewed By: mofarrell

Differential Revision: D5202473

fbshipit-source-id: e4e266c68075c83588771442f3aa7904d308d00b
mofarrell pushed a commit that referenced this issue Jun 9, 2017
Summary:
Used by parts of symfony that composer users when creating zips/tars/phars

refs #7869

Depends on D5202473

Reviewed By: paulbiss

Differential Revision: D5202739

fbshipit-source-id: b0a935bb56ec41425fefad6aa87be7a28fc3a4ec
mofarrell pushed a commit that referenced this issue Jun 9, 2017
Summary:
`unpack('C*')` returns `array<int>`, but the code thought it returned
`array<single-char-string>` then called `ord()` on each value. `ord()` requires
string parameters.

 - In PHP5 mode, this created incorrect checksums - we just want to add the int
   value to the checksum, but were adding `ord(substr((string) $int, 0, 1))`
 - In PHP7 mode, this throws a type error

gets composer to 99.9%

refs #7869

Depends on D5202739

Reviewed By: paulbiss

Differential Revision: D5202974

fbshipit-source-id: cb1b8157c316a6c8c70408654bacf033e51e98f3
@facebook facebook deleted a comment from ganeshsoni Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants