php

Back Open Paginator
13.03.2026 16:29
fortrabbit (@fortrabbit@mastodon.social)

Explore our free trial to discover the platform, develop features, transfer projects, or hack together weekend experiments. but different.
docs.fortrabbit.com/platform/g





Show Original Post


13.03.2026 16:18
fox (@fox@cytag.nl)

A download script with limits and an admin panel
I was in need of a script that would display files in a folder which then a visitor could download. But only 5 per 24 hours, to prevent the server getting swamped. I have tested it with a folder that had more than 2100 files in it and it’s still blazingly fast. How to set up: Create a folder to place the scripts admin.php and download.php in Within that folde
---
3xn.nl/projects/2026/03/13/a-d
---
#download #php #script




Show Original Post


13.03.2026 15:48
remi (@remi@phpc.social)

#Fedora changes of this week

All #PHP extensions, coming from PECL and also available in packagist (PIE), have been cleaned of pecl stuff (25 packages for now).

So "php-pear" is no longer required at build or runtime.

Example: src.fedoraproject.org/rpms/php




Show Original Post


13.03.2026 15:36
jclermont (@jclermont@phpc.social)

In today's video, I show you how PHPStorm's PR review tools give you better file tracking than GitHub's own interface. #php #laravel masteringlaravel.io/daily/2026




Show Original Post


13.03.2026 15:14
2026 (@2026@andreas.heigl.org)

Code-Coverage with PCOV in a mono-repo

Today I finally managed to find and fix an issue that we had for some time with Code-Coverage generation with PCOV in github actions.

To give you a bit of background, imagine a project that uses 2 separate folders where one contains the business-logic and one contains the framework-related code. The framework-related part contains a lot of integration and end-to-end test that – of course – also use and therefore test the business-logic.

Every PullRequest runs the tests both from the bunsiness-logic part as well as from the framework-related part. And to give the developers feedback how well the changed code is covered with tests we collect coverage data and generate a patch-coverage report. I wrote about that some time back. So we now get a comment each in the PR that contains the untested lines in the business-logic related part and the framework-related part respectively.

That worked flawlessly for the business-logic related part as those were mostly unit-tests that do not rely upon the framework-related code.

The framework-related part though didn’t work that great. It always showed the business-logic related parts as untested even though I knew they were tested.

So… Why?

After some digging I realized that there is a difference in how the coverage is created between Xdebug and pcov – yes! There is obviously a difference as those are different tools. But there is also a difference in what is included in the reports.

And today I figured out what it was and why it broke our proces in our specific setup in GitHub actions.

For a start: We have our code in two folders: business and framework.

We also have a framework/phpunit.xml file that contains this code:

<?xml version="1.0" encoding="UTF-8"?><phpunit
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.1/phpunit.xsd"
    processIsolation="false"
    stopOnFailure="false"
>
  <coverage/>
  <source>
    <include>
      <directory>src</directory>
      <directory>../business/src</directory>
    </include>
  </source>
</phpunit>

So coverage shall be collected from the current src folder as well as from the business/src folder.

This works as expected when you run phpunit with Xdebug as coverage-generator.

With pcov as coverage-generator it worked locally as expected.

But not in our GitHub Actions…

Enter pcov.directory

After a bit of digging I learned that there is the pcov.directory ini-setting that determines which code is considered for coverage. So I tested my GitHub Actions by adding some test-code like this:

jobs:
  tests:
    steps:
      - name: "Checkout"
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
        with:
          ref: ${{ github.event.pull_request.head.ref }}

      - name: "Install PHP"
        uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
        with:
          extensions: "intl, pdo_mysql, zip, imap, xml, soap, apcu, redis"
          php-version: "8.4"
          coverage: "pcov"
      - name: "check pcov.directory"
        run: |
          php -i | grep pcov

Running this in GitHub Actions provided me with output similar to this:

Run php -i | grep pcov
/etc/php/8.4/cli/conf.d/20-pcov.ini,
pcov
pcov.directory => /home/runner/work/<org-name>/<repo-name>
pcov.exclude => none
pcov.initial.memory => 65336 bytes
pcov.initial.files => 64

/home/runner/work/<org-name>/<repo-name> was exactly what i expected! So why the heck does it seemingly not work?

After some more testing I realized that I was at one point doing a cd framework before running PHPUnit.

- name: "Run tests"
  run: |
    cd framework
    vendor/phpunit/phpunit/phpunit --coverage-php /tmp/${{ github.sha }}_coverage.cov

Should that cause some issues?

So I added the php -i | grep pcov after the PHPUnit run like this:

- name: "Run tests"
  run: |
    cd framework
    vendor/phpunit/phpunit/phpunit --coverage-php /tmp/${{ github.sha }}_coverage.cov
    php -i | grep pcov

And what was that? Suddenly I got

pcov.directory => /home/runner/work/<org-name>/<repo-name>/framework/src

🤯

Suddenly the pcov directory was set to something totally different. And with that setting it was clear that I couldn’t get what I expected as now only content from framework/src/ would be considered as covered. And everything from the business folder was not considered for coverage.

So the only question left was whether that was something happening deep in PHPUnits logic or just based on changing the directory.

Long story short: It’s just based on the change directory. In essence setup-php sets up pcov so that the current folder is considered as pcov.directory. As pcov itself adds src when that folder is available that explains the changed folder.

But is there a way to change that? To use a fixed folder despite the current working directory being changed?

Yes! There is.

I added ini-values: "pcov.directory=$GITHUB_WORKSPACE" to the setup-php directive like this:

      - name: "Install PHP"
        uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
        with:
          extensions: "intl, pdo_mysql, zip, imap, xml, soap, apcu, redis"
          ini-values: "pcov.directory=$GITHUB_WORKSPACE"
          php-version: "8.4"
          coverage: "pcov"

And all of a sudden the pcov.directory stayed regardless of where I changed the working directory to.

And so with this little change I was again able to get the coverage-data from the business folder whenever i run tests in the framework folder.

Helpful links:

#coverage #pcov #php #phpunit


Show Original Post


13.03.2026 14:32
MonkeybreadSoftware (@MonkeybreadSoftware@mastodon.social)

The special discount for the DynaPDF 5 Introduction ends 15th March 2026.

If you need a new license, an update or an upgrade to a higher tier, please use it.

For , , C/C++, C#, , , , Visual Basic, , and VB .Net.

mbsplugins.de/archive/2026-02-




Show Original Post


13.03.2026 14:16
mmramadan496 (@mmramadan496@phpc.social)

Stay up to date with **Laravel releases**, **new packages**, **AI tools**, **developer tips**, and **important tech news** — all in one place. 🔥

Get everything new in the **Laravel community** — updates from **X**, **YouTube**, **Laracasts**, and more — plus the latest in the broader **tech field**, all delivered straight to your inbox. 📢

📬 Read the latest issue:
mmramadan.com/newsletter/archi

📚 Browse the full newsletter archive:
mmramadan.com/newsletter

#tech #technology #php #laravel #ai #claude





Show Original Post


13.03.2026 11:17
sephster (@sephster@fosstodon.org)

Interesting PR came in the other day saying ext-json is no longer needed in composer reqs as it is bundled into PHP core. Is there any way this might not be the case? Can you build PHP with this excluded still? I have never really had the need to build PHP from scratch so unsure #php




Show Original Post


13.03.2026 10:10
decompwlj (@decompwlj@mathstodon.xyz)

A179336: Primes containing at least one prime digit in base 10
A179336 ➡️ oeis.org/A179336

3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A179336.
3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A1793
2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

#decompwlj #math #mathematics #maths #sequence #OEIS #JavaScript #php #graph #3D #threejs #webGL #triangular #numbers #primes #PrimeNumbers #palindromes #animation #FundamentalTheoremOfArithmetic #sequences #NumberTheory #classification #integer #decomposition #number #theory #equation #graphs #sieve #fundamental #theorem #arithmetic #research





Show Original Post


13.03.2026 10:08
anthony (@anthony@bitbang.social)

It's new #Elephpant day

#LeMonstre #FrankenPHP #PHP





Show Original Post


13.03.2026 10:05
decompwlj (@decompwlj@mathstodon.xyz)

Decomposition into weight × level + jump of prime numbers:
- a new classification of primes ➡️ decompwlj.com/primedecomp.php
- in 3D - threejs - webGL ➡️ decompwlj.com/3Dgraph/Prime_nu

#decompwlj #math #mathematics #maths #sequence #OEIS #JavaScript #php #graph #3D #threejs #webGL #triangular #numbers #primes #PrimeNumbers #palindromes #animation #FundamentalTheoremOfArithmetic #sequences #NumberTheory #classification #integer #decomposition #number #theory #equation #graphs #sieve #fundamental #theorem #arithmetic #research





Show Original Post


13.03.2026 10:04
decompwlj (@decompwlj@mathstodon.xyz)

A179244: Numbers that have 4 terms in their Zeckendorf representation
A179244 ➡️ oeis.org/A179244

3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A179244.
3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A1792
2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

#decompwlj #math #mathematics #maths #sequence #OEIS #JavaScript #php #graph #3D #threejs #webGL #triangular #numbers #primes #PrimeNumbers #palindromes #animation #FundamentalTheoremOfArithmetic #sequences #NumberTheory #classification #integer #decomposition #number #theory #equation #graphs #sieve #fundamental #theorem #arithmetic #research





Show Original Post


1 ...81 82 83 84 85 86 87 88 89 90 91 ...524
UP