badges / poser Goto Github PK
View Code? Open in Web Editor NEWPHP badges library
Home Page: https://poser.pugx.org
License: MIT License
PHP badges library
Home Page: https://poser.pugx.org
License: MIT License
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
As far as I know there is no way to change the label color (left part).
I think it might be a great feature to be able to add a ?label_color=FFFFFF
to further customize the badge.
With FFFFFF
: the value of the color in hex.
Shields.io support this (See 'styles' on shields.io):
So it would give something like this:
echo $poser->generate('license', 'MIT', 'FFFFFF', '428F7E', 'plastic');
// or
$image = $poser->generate('license', 'MIT', 'FFFFFF', '428F7E', 'plastic');
The default color should be the default grey/gray.
Q | A |
---|---|
BC Break | maybe |
Library Version | any |
PHP version | any |
I'd like to suggest the removal of the symlinks in the bin/ folder:
1/ the files should be available in ./vendor/bin/ which is quite standard and common (ie. remove the "bin-dir" configuration in the composer.json)
2/ the symlinks are generated by composer anyway, so they should not be commited to the repository
Symfony 7 is about to be released (in one month, more or less), so it's time to consider upgrading minimum requirements.
Here's my proposal:
The new PHP requirement will involve also upgrading our CS rules.
Hi,
I hope you can implement for example ?style=flat-square
parameter for svg as flat-square style.
From PUGX/badge-poser#143
It appears that the badges are currently not working, see
Running
$ curl -v https://poser.pugx.org
yields
* Rebuilt URL to: https://poser.pugx.org/
* Trying 139.162.198.19...
* TCP_NODELAY set
* Connection failed
* connect to 139.162.198.19 port 443 failed: Operation timed out
* Failed to connect to poser.pugx.org port 443: Operation timed out
* Closing connection 0
curl: (7) Failed to connect to poser.pugx.org port 443: Operation timed out
and running
$ curl -v http://poser.pugx.org
yields
* Rebuilt URL to: http://poser.pugx.org/
* Trying 139.162.198.19...
* TCP_NODELAY set
* Connection failed
* connect to 139.162.198.19 port 80 failed: Connection refused
* Failed to connect to poser.pugx.org port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to poser.pugx.org port 80: Connection refused
Is there anything we can help with?
@LifeOfJona noted in antonkomarev/github-profile-views-counter#18 that lightgrey
color is not working.
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
This library at this moment has inconsistency in color scheme aliases naming:
lightgray
exists, but lightgrey
missinggray
missing, but grey
existsShields.io supports both variations of word "lightgrey":
Shields.io supports both variations of word "grey":
We should also support lightgrey
& gray
colors as well.
Q | A |
---|---|
BC Break | ? |
Library Version | N/A (not used by myself) |
PHP version | N/A (not used by myself) |
There seems to be some odd rendering behaviour with this PHP library and using letters such as "W".
When using those is there a weird gap before the letter itself.
This is prominently visible in this project's readme, by looking at the "downloads" badge, which displays as "do wnloads"
Here's an image of what I mean.
Using shields.io directly (i.e. https://img.shields.io/badge/downloads-16.9%20k-blue) doesn't show this specific issue, so it must be a cause by this library.
This was originally reported to antonkomarev/github-profile-views-counter#26
I use Edge as browser to view these badges, so if it doesn't show on Chrome (Probably unlikely as Edge also uses Chromium), Firefox, Safari, etc. could it be a browser-specific issue.
The badges have random gaps (mostly before a W) for no apparent reason.
I don't really use this library myself, so I can't give clear steps to reproduce. It's just something I noticed and wanted to report.
The badge should look like the example I provided:
Q | A |
---|---|
BC Break | no |
Library Version | 2.3.0 |
PHP version | 7.4 |
Remove unpublished fork ricardoboss/easysvg
deps to composer.json as soon as the PR is released: kartsims/easysvg#32
Assigned to @ricardoboss :)
Ok?
Thanks for providing this, it's pretty awesome! I was wondering if it would be possible to add support for github workflows in a test/build status badge?
https://poser.pugx.org/soatok/faq-off/v/stable yields the following:
<svg xmlns="http://www.w3.org/2000/svg" width="1908" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="a">
<rect width="1908" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#a)">
<rect width="1855" height="20" fill="#555"/>
<rect x="1855" width="53" height="20" fill="#e05d44"/>
<rect width="1908" height="20" fill="url(#b)"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="928.5" y="15" fill="#010101" fill-opacity=".3">exception 'Predis\ServerException' with message 'MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.' in /var/www/bp/badge-poser3/vendor/predis/predis/lib/Predis/Client.php:282
Stack trace:
#0 /var/www/bp/badge-poser3/vendor/predis/predis/lib/Predis/Client.php(250): Predis\Client->onResponseError(Object(Predis\Command\StringIncrement), Object(Predis\ResponseError))
#1 /var/www/bp/badge-poser3/vendor/predis/predis/lib/Predis/Client.php(228): Predis\Client->executeCommand(Object(Predis\Command\StringIncrement))
#2 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Service/RedisPersister.php(62): Predis\Client-> call('incr', Array)
#3 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Service/RedisPersister.php(62): Predis\Client->incr('STAT.TOTAL')
#4 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Listener/StatsListener.php(75): PUGX\StatsBundle\Service\RedisPersister->incrementTotalAccess()
#5 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Listener/StatsListener.php(45): PUGX\StatsBundle\Listener\StatsListener->persistData(Object(Symfony\Component\HttpFoundation\Request), 'versionAction')
#6 [internal function]: PUGX\StatsBundle\Listener\StatsListener->onKernelController(Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent), 'kernel.controll...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#7 /var/www/bp/badge-poser3/app/cache/prod/classes.php(1782): call user func(Array, Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent), 'kernel.controll...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#8 /var/www/bp/badge-poser3/app/cache/prod/classes.php(1700): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.controll...', Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent))
#9 /var/www/bp/badge-poser3/app/bootstrap.php.cache(3208): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.controll...', Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent))
#10 /var/www/bp/badge-poser3/app/bootstrap.php.cache(3173): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /var/www/bp/badge-poser3/app/bootstrap.php.cache(3324): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/bp/badge-poser3/app/bootstrap.php.cache(2514): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/bp/badge-poser3/web/app.php(18): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#14 {main}</text>
<text x="928.5" y="14">exception 'Predis\ServerException' with message 'MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.' in /var/www/bp/badge-poser3/vendor/predis/predis/lib/Predis/Client.php:282
Stack trace:
#0 /var/www/bp/badge-poser3/vendor/predis/predis/lib/Predis/Client.php(250): Predis\Client->onResponseError(Object(Predis\Command\StringIncrement), Object(Predis\ResponseError))
#1 /var/www/bp/badge-poser3/vendor/predis/predis/lib/Predis/Client.php(228): Predis\Client->executeCommand(Object(Predis\Command\StringIncrement))
#2 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Service/RedisPersister.php(62): Predis\Client-> call('incr', Array)
#3 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Service/RedisPersister.php(62): Predis\Client->incr('STAT.TOTAL')
#4 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Listener/StatsListener.php(75): PUGX\StatsBundle\Service\RedisPersister->incrementTotalAccess()
#5 /var/www/bp/badge-poser3/src/PUGX/StatsBundle/Listener/StatsListener.php(45): PUGX\StatsBundle\Listener\StatsListener->persistData(Object(Symfony\Component\HttpFoundation\Request), 'versionAction')
#6 [internal function]: PUGX\StatsBundle\Listener\StatsListener->onKernelController(Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent), 'kernel.controll...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#7 /var/www/bp/badge-poser3/app/cache/prod/classes.php(1782): call user func(Array, Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent), 'kernel.controll...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#8 /var/www/bp/badge-poser3/app/cache/prod/classes.php(1700): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'kernel.controll...', Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent))
#9 /var/www/bp/badge-poser3/app/bootstrap.php.cache(3208): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.controll...', Object(Symfony\Component\HttpKernel\Event\FilterControllerEvent))
#10 /var/www/bp/badge-poser3/app/bootstrap.php.cache(3173): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#11 /var/www/bp/badge-poser3/app/bootstrap.php.cache(3324): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#12 /var/www/bp/badge-poser3/app/bootstrap.php.cache(2514): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/bp/badge-poser3/web/app.php(18): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#14 {main}</text>
<text x="1880.5" y="15" fill="#010101" fill-opacity=".3">generic</text>
<text x="1880.5" y="14">generic</text>
</g>
</svg>
Hi @garak @AlessandroMinoccheri @antonkomarev
WDYT about to move in a conventional commit and conventional changelog way?
If we do this we could automate the process of generating a new release and updating the changelog file automatically.
I tried this flow in my personal repo with an github action: https://github.com/JellyBellyDev/ImageOrientationFix/blob/master/.github/workflows/release.yml
How it works: when we would generate a new release go to tab actions, select "Create release" workflow, and click on "Run workflow".
The workflow will do:
Ref:
Example:
See the last two release:
https://github.com/JellyBellyDev/ImageOrientationFix/releases
https://github.com/JellyBellyDev/ImageOrientationFix/blob/master/CHANGELOG.md
WDYT?
Q | A |
---|---|
New Feature | yes |
RFC | yes |
BC Break | unknown |
You currently have these styles, and they are very useful:
style | demo |
---|---|
flat |
|
flat-square |
|
plastic |
|
for-the-badge |
However, shields.io has one other style available: social
. See more info here.
For example:
style | demo |
---|---|
flat |
|
flat-square |
|
plastic |
|
for-the-badge |
|
social |
But when I try to use this for Profile Views:
![](https://komarev.com/ghpvc/?username=chrimaho&style=social)
Can you please also add this ?style=social
function to your repo?
Also related to this issue on another repo.
Thank you!
There's currently a certificate error present.
Certificate Error
There are issues with the site's certificate chain (net::ERR_CERT_DATE_INVALID).
Duplicate of #160.
Hi there,
Is it possible to tag a stable release from master?
Cheers!
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
These renderers SvgPlasticRender
, SvgFlatRender
, SvgFlatSquareRender
depends on GD library despite the fact they are rendering to SVG. On my machine system library libgd was broken and I found that I cannot generate SVG images, what was unexpected. SvgForTheBadgeRenderer
working without GD.
SvgPlasticRender
, SvgFlatRender
, SvgFlatSquareRender
using GD to compute text width (they are using GDTextSizeCalculator
).
We are not using GD for the SVG generation.
Then we will be able to drop "ext-gd": "*"
dependency.
Hi,
It seems that v2.1.0 has been released on GitHub but not yet on packagist, so composer doesn't install it right now. Could you release it there too?
Please add the ability to download the package through the phar archive
For example, using this package https://github.com/box-project/box
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
Spaces are missing between the tag name and attributes, breaking the XML format
is it possible to use the private packagist.com instead of the public packagist.org?
Hi!
I love your badges! Thanks!
Recently I started making alpha releases, and decided to use your latest unstable badge. To my surprize, instead of showing the latest unstable release (like 0.1-alpha2
or dev-develop
) it shows the branch that has the latest stable release (like dev-master
). Is there something I am missing? Is there something I can do to show the dev-develop
branch instead, or an alpha/beta/RC branch/tag?
I guess it's time to raise requirements, allow some new features (e.g. Symfony 5) and drop unsupported deps
It could be useful to add to circleCI another image with PHP8 to check if everything it's ok or not, what do you think?
Q | A |
---|---|
New Feature | yes |
RFC | no |
BC Break | no |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.