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

Detect extra old installations #2946

Closed
wants to merge 6 commits into from

Conversation

keradus
Copy link
Member

@keradus keradus commented Jul 29, 2017

When instlaled via composer, there are about:

  • 2500 daily installation with old vendor name (regardless of version)
  • 3000 daily installation of v1 (with new vendor name)

For that, we have >5k daily downloads of version we do not support.
Let us try to reduce that numer.

@keradus keradus added this to the 1.13.2 milestone Jul 29, 2017
}

foreach ($warningsDetector->getWarnings() as $warning) {
$stdErr->writeln(sprintf($stdErr->isDecorated() ? '<bg=yellow;fg=black;>%s</>' : '%s', $warning));
Copy link
Member

Choose a reason for hiding this comment

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

Is the isDecorated() check needed? I think Symfony does it internally anyway.

Copy link
Member Author

Choose a reason for hiding this comment

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

it's moved 1-1 from FixCommand, no idea

Copy link
Member

Choose a reason for hiding this comment

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

Just tried, I confirm that Symfony internally strips style tags when needed. However there are other places where this check could be dropped so, if you agree, I'll do this in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

let's go with separated PR indeed, input from person who did this check originally would be nice as well

Copy link
Contributor

Choose a reason for hiding this comment

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

stdErr is an instance of OutputInterface and we don't check the formatter, so I think we cannot be sure escaping is done here always? If we assume we can rely on this on other places than lets remove the check here as well in a new PR, otherwise lets leave as is ;)

if (self::COMPOSER_PACKAGE_NAME === $package['name']) {
$result = $package['version'].'#'.$package['dist']['reference'];
if (
self::COMPOSER_PACKAGE_NAME === $package['name'] ||
Copy link
Member

Choose a reason for hiding this comment

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

in_array()?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@keradus
Copy link
Member Author

keradus commented Aug 1, 2017

@localheinz , maybe you could take a look on this and review it please ?

Copy link
Member

@julienfalque julienfalque left a comment

Choose a reason for hiding this comment

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

👍 for the idea. I'm not a big fan of hardcoded version warnings but I don't see a proper solution without hurting performance.

@keradus
Copy link
Member Author

keradus commented Aug 19, 2017

https://repo-stats.github.io
stats

Almost 30% is still using v1. Let us hope with this change it will decrease

keradus added a commit that referenced this pull request Aug 19, 2017
This PR was squashed before being merged into the 1.13 branch (closes #2946).

Discussion
----------

Detect extra old installations

When instlaled via composer, there are about:
- 2500 daily installation with old vendor name (regardless of version)
- 3000 daily installation of v1 (with new vendor name)

For that, we have >5k daily downloads of version we do not support.
Let us try to reduce that numer.

Commits
-------

93e764c Detect extra old installations
@keradus keradus closed this Aug 19, 2017
@keradus keradus deleted the 1.13_warnings branch August 19, 2017 11:34
@localheinz
Copy link
Member

@keradus

Ha, apologies for the delay!

@keradus
Copy link
Member Author

keradus commented Aug 19, 2017

no issue, I assumed you were not interested in this ;)

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.

None yet

4 participants