#microformats 2020-04-30

2020-04-30 UTC
[tw2113], KartikPrabhu, [tantek], beko and [prtksxna] joined the channel
#
GWG
gRegorLove: Composer.lock issue. Your thoughts?
#
gRegorLove
My mental energy may be spent for the day
#
gRegorLove
Not sure I understand pfefferle's comment about the .lock file
#
GWG
gRegorLove: There is no reason that the lock file has to be part of the repo
#
GWG
But there are also reasons to include it
#
gRegorLove
In general, I'm in favor of the minimal necessary changes to make it PHP5.6 minimum. I'm not aware of the .lock file causing problems to date.
#
[tantek]
gRegorLove I can relate. And I think that's a good recommendation
Sajesajama joined the channel
#
GWG
So, gRegorLove if you approve the change I made, we can merge it
#
KartikPrabhu
gRegorLove: go take a rest :)
#
GWG
gRegorLove: Done
#
GWG
Back to the docblock grind, I guess.
[jgarber] joined the channel
#
[jgarber]
Small PR on microformats/tests following on the recently-merged update to `img` element `alt`/`src` attribute parsing: https://github.com/microformats/tests/pull/116
#
[jgarber]
Found some test results that weren’t in alignment with the spec.
#
Loqi
[jgarber623] #116 Update JSON output to comply with Parsing Specification Section 1.5
#
[jgarber]
☝ I’d be most appreciative if someone could check my work on that. It’s late here in DC. 😴
Sajesajama_, mblaney, KartikPrabhu and [jansauer] joined the channel
#
[jansauer]
Done
IWSlackGateway1, gRegorLove, mauz555, KartikPrabhu, [KevinMarks], jgmac1106, [Arne], [mapkyca], justache, [LewisCowles], stkhbhd_, takev[m], jamietanna[m], confraria[m], [jgmac1106], lol1, IWSlackGateway, [grantcodes], chander, pockets and [jgarber] joined the channel; mblaney left the channel
#
[jgarber]
[jansauer] Great catch, thank you!
[tantek], [fluffy], [schmarty], [sri], [LewisCowles], [Aaron_Klemm], [mapkyca], [tw2113], gRegorLove and [jgarber] joined the channel
#
[jgarber]
Are there any objections to merging these two PRs on microformats/tests? [jansauer] and I have reviewed one another’s, but would anyone else care to chime in?
#
Loqi
[jansauer] #115 Add test for id's on microformats
#
Loqi
[jgarber623] #116 Update JSON output to comply with Parsing Specification Section 1.5
[snarfed] and [Arne] joined the channel
#
[jgarber]
[tantek] Thanks for the approvals on those PRs!
[fluffy] and [grantcodes] joined the channel
[benatwork] joined the channel
#
gRegorLove
May be out of my depth with composer.lock. I'm not following this https://github.com/microformats/php-mf2/pull/220#issuecomment-621656876
#
gRegorLove
Didn't expect upping from 5.4 to 5.6 minimum would generate this much confusion
#
gRegorLove
GWG: Have you tested installing with the new composer updates in a 5.6 environment?
#
GWG
Only in Travis
#
gRegorLove
ok, which should be good
[mapkyca] joined the channel
#
GWG
gRegorLove: That's what I use CI for...or try to. I need to be better at it
#
GWG
I just built a Travis file for one project that implements stages...so if X fails, it won't even try Y
KartikPrabhu joined the channel
#
GWG
Then added PHPCPD to detect dupe code, and a few other fun testing protocols
#
cjw6k
The composer.lock file takes the set of dependencies, and puts a single pin/thread through each one that strings together a working valid state. It may bite hard in future days when composer.lock is missing.
#
cjw6k
Given dependencies A and B which each depend on a dependency P: at some future date P pushes a new major version. Dependency A updates to require D at the new major version, but may not update it's own major version number. Meanwhile B continues but isn't ready to change to meet requires for the new major release of P.
#
cjw6k
Without a lock file, composer tries to resolve the dependency issues automatially. In a perfect scenario, composer would collapse these conflicts into a working set of dependencies.
#
cjw6k
It doesn't always work like this in practice. Composer balloons to use a very, very large amount of RAM while chasing a working combination of packages. Consider a 2GB of RAM virtual machine not having enough memory for the process to complete.
#
cjw6k
The composer.lock file permits the install to choose the exact versions of dependencies which provide a working state and avoids the whole ordeal.
#
cjw6k
It's a simple enough process to resolve this irreconcilable dependency issue with composer, but it takes specialized knowledge and a very good grasp the cause of the error.
#
cjw6k
s/D/P/
KartikPrabhu joined the channel
#
GWG
cjw6k: That's why we have a problem
[Kevin_Faaborg] joined the channel
#
cjw6k
I recommend you commit the .lock file in every case
#
gRegorLove
I... don't think we have a problem.
#
gRegorLove
Running `composer require mf2/mf2` should give you php-mf2 with 5.6-compatible dependencies, based on the .lock file
#
gRegorLove
If you're in PHP5.6 environment, it just works
#
gRegorLove
If you're in PHP7, running `composer update` will update those dependencies to 7-compatible
#
gRegorLove
Yeah, config.platform shouldn't be in either composer file imo
#
cjw6k
I should not make comments out of context. Read something something about not using .lock on the github issue. Triggered I guess
#
gRegorLove
No worries. Yeah, we've had a .lock file and will continue to
#
GWG
I'm still not 100% versed in how you generate a lock file for a specific PHP version other than adding the config parameter, generating it then removing the config parameter
#
gRegorLove
I've done it by running composer using the specific PHP binary
#
GWG
gRegorLove: So, I need to install multiple binaries
#
gRegorLove
`php56 composer.phar install`
[pfefferle] joined the channel
#
[pfefferle]
but what have to be php5.6 compatible?
#
gRegorLove
If there's a way to use config.platform without it also going in the lock file, that would work instead. I'm not familiar though.
#
[pfefferle]
Isn’t the php compatibility handled by the version of the dependencies?
#
[pfefferle]
I am not aware of dependencies that are installed based on the php version!?!
#
gRegorLove
It's what GWG ran into in the earlier commits. The dependencies he added used PHP7-compatible versions bc his PHP env was 7. Then Travis failed on PHP5.6
#
[pfefferle]
GWG can you share the travis test?
#
gRegorLove
Probably because Travis is (correctly, imo) running composer install, not composer update
#
gRegorLove
The latest is linked at the bottom of the PR under checks. Here's the list https://travis-ci.org/github/microformats/php-mf2/pull_requests
#
[pfefferle]
this is weird… if it runs under php 7.1 it errors that it requires php ^7.2
#
[pfefferle]
if it runs under php 5.6 it errors that it requires php ^7.1
#
[pfefferle]
never seen something like this
#
cjw6k
speculation: it errors on the first incompatibility. 7.1 makes it further down the list
#
[pfefferle]
but why does composer installs deps php dependent?
#
[pfefferle]
it errors in doctrine/lexer
#
[pfefferle]
but the composer.lock files says doctrine/lexer is “php”: “>=5.3.2"
#
[pfefferle]
the dependency is set to 1.* and 1.2 requires ^7.2
#
[pfefferle]
what dep needs doctrine/lexer ???
#
[pfefferle]
is it one of the test libs? phpunit, …? or mastermind/html5
#
[pfefferle]
if it is one of the test deps, I would vote for different test libs based on the php version
#
GWG
This is the first time I've had this kind of problem. But I think we can figure it out
#
gRegorLove
I have a 5.6 env available, I may try master branch and adding the new dependencies and see what happens
#
GWG
gRegorLove: Thanks
#
GWG
It was so much easier with PHP 5.2
#
[pfefferle]
but you did not only change the php version, but added a lot of dev-deps
#
[pfefferle]
so I would bet, that it also breaks with 5.2 now 😉
#
cjw6k
https://packagist.org/packages/phpcompatibility/php-compatibility lists a conflict with php_codesniffer 2.6.2 - maybe that helps?
[jansauer] joined the channel
#
[jansauer]
[tantek] thx for merging
[tantek] joined the channel
#
[tantek]
[jansauer] all I did was code review the pull requests, not sure who did the merges :)
#
[jansauer]
hups; you are totally correct
#
[jansauer]
in that case thx for reviewing^^
[Aaron_Klemm], [benatwork], [MitchWagner] and [tw2113] joined the channel