profile
viewpoint
Viktor Szépe szepeviktor G2RM+5M Budapest https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md I make your #web application's life happy 📡 Consulting and 24/7 Operations 🏡 I'm on GitHub to blow off the steam by doing high quality work.

nunomaduro/larastan 3502

⚗️ Adds code analysis to Laravel improving developer productivity and code quality.

conedevelopment/bazar 272

Bazar is an e-commerce package for Laravel applications.

nginx-modules/ngx_cache_purge 140

nginx module which support to purge ngx_http_(fastcgi|proxy|scgi|uwsgi)_module cache backend

Automattic/wordbless 84

WorDBless allows you to use WordPress core functions in your PHPUnit tests without having to set up a database and the whole WordPress environment

aFarkas/wp-lazysizes 66

Brings lazySizes.js to WordPress

Koodimonni/Composer-Dropin-Installer 36

Use composer for installing dropin dependencies

szepeviktor/acf-get 8

Strongly typed Advanced Custom Fields get_field function variants

szepeviktor/acf-custom-database-tables-test 2

Static analysis for Advanced Custom Fields: Custom Database Tables

szepeviktor/acf-pro-stubs 2

Advanced Custom Fields PRO function, class, and global variable declaration stubs for easier static analysis.

szepeviktor/1.-tesztmunk-m 0

most tanulom. Ezt először csak tesztelem.

pull request commentekandreas/tant

Simplify ClassFactory

[off] While working with your code I've realized PHP 8 offers great parameter and return typehints. Please consider using them.

szepeviktor

comment created time in 16 hours

PR opened ekandreas/tant

Simplify ClassFactory

This all I can offer.

+9 -16

0 comment

1 changed file

pr created time in 17 hours

push eventszepeviktor/tant

Viktor Szépe

commit sha 8e8f8119afbade026fb17d67531621d5f68680d6

Simplify ClassFactory

view details

push time in 17 hours

startedduplicati/duplicati

started time in a day

PR closed johnbillion/wp-crontrol

Use an autoloader

Playing with ancient technologies :) (PHP 5.1.0)

playing, not sending a PR!

+71 -18

2 comments

8 changed files

szepeviktor

pr closed time in a day

push eventszepeviktor/debian-server-tools

Viktor Szépe

commit sha c5d133bdcf152ccc6425783f538ca7c7e7360104

daily

view details

push time in 2 days

issue commentnunomaduro/larastan

Modifying collection's shape with combine() seems not supported

Hallo David! 👋 Larastan infers closure parameters from the collection. combine is not taken into consideration. https://github.com/nunomaduro/larastan/blob/695d005f56d2fd71876d604e78708ad1acc96781/stubs/Enumerable.stub#L28

    $combined = collect(['key1', 'key2'])->combine($row);
    /** @var \Illuminate\Support\Collection<string, \stdClass> $new */
    $new = $combined->mapWithKeys(fn (\stdClass $value, string $key) => [$key => $value]);

How about something like this? I may have had a mistake!

underdpt

comment created time in 2 days

issue openednunomaduro/larastan

Battle of The Century

🖱️ https://www.libhunt.com/compare-phpstan-wordpress-vs-larastan

created time in 2 days

issue commentnunomaduro/larastan

With SoftDeletes `deleted_at` is a Carbon instance, not a string

Maybe here it is https://github.com/nunomaduro/larastan/blob/7d6e564144b2f9c231d0331d4083905a1b3e872b/src/Properties/SchemaAggregator.php#L372-L378

MatanYadaev

comment created time in 2 days

issue commentnunomaduro/larastan

Larastan infers that `deleted_at` is a string and not a Carbon.

I don't have to create a PR with failing tests when I open an issue?

Oh yess!!

MatanYadaev

comment created time in 2 days

issue commentnunomaduro/larastan

Larastan infers that `deleted_at` is a string and not a Carbon.

Do you suggest that onlyTrashed() prevents deleted_at from being null?

MatanYadaev

comment created time in 3 days

issue commentnunomaduro/larastan

Larastan infers that `deleted_at` is a string and not a Carbon.

Pull request with failing test:

Thank you for your report. You do not need to open a PR for your issues.

MatanYadaev

comment created time in 3 days

PR opened patchstack/wpcli-patchstack

Do not emit an empty line

On every WP-CLI this empty line appears ruining the output.

+0 -1

0 comment

1 changed file

pr created time in 3 days

push eventszepeviktor/wpcli-patchstack

Viktor Szépe

commit sha 0589d1639501b677cf2e4fa815273f74c9f31da8

Do not emit an empty line

view details

push time in 3 days

push eventszepeviktor/phpstan-wordpress

Viktor Szépe

commit sha c98c46d02684e273ae333e65e924bf1862c13ae2

Upgrade to composer/composer v2

view details

Viktor Szépe

commit sha 927630be903f27d37dd126e47c93cc8a98f2ec8d

Merge branch 'master' of github.com:szepeviktor/phpstan-wordpress

view details

push time in 4 days

push eventszepeviktor/phpstan-wordpress

Viktor Szépe

commit sha 8a27068d07287da2f02a5b4eac28521c75a0d01f

Add nav menu classes with "extends"

view details

Viktor Szépe

commit sha 905f50d6625a581ae6ada5900cdbeab8f42fec3c

Fix typo

view details

Viktor Szépe

commit sha 65c6e9f1708a946f367811978415a13b7fe73f1e

Merge pull request #73 from szepeviktor/wp-post

view details

push time in 4 days

delete branch szepeviktor/phpstan-wordpress

delete branch : wp-post

delete time in 4 days

push eventszepeviktor/phpstan-wordpress

Viktor Szépe

commit sha 0f94d46d791865ad7a635680f3c295a61391fd52

Use spaces in XML files

view details

push time in 4 days

push eventszepeviktor/phpstan-wordpress

Viktor Szépe

commit sha 743465a47340c22d14df9af79afb261043723198

Fix CS

view details

push time in 4 days

issue commentWordPress/performance

Define name for the performance plugin

There are two very-very separate parts of WordPress performance.

  1. WordPress core generating HTML code
  2. Browser loading HTML and linked resources, rendering page. Please take this into consideration.
felixarntz

comment created time in 4 days

push eventszepeviktor/phpstan-wordpress

John Blackbourn

commit sha 1b5bc4dc96df19fe08d2dcd07ce951a6fdc3fc63

Hook docs rule (#78)

view details

push time in 4 days

issue closedszepeviktor/phpstan-wordpress

Extend PHPStan scanning to cover `@param` tags of `apply_filters()` and `do_action()`

No idea if this is possible, I'm going to look into it and maybe ask on the PHPStan discussion forums.

When PHPStan encounters a call to apply_filters() or do_action() it should validate the types of the parameters passed to it according to the @param tags in the preceding docblock.

Example:

/**
 * Filters the date formatted based on the locale.
 *
 * @param string       $date      Formatted date string.
 * @param string       $format    Format to display the date.
 * @param int          $timestamp Unix timestamp.
 * @param DateTimeZone $timezone  Timezone.
 */
$date = apply_filters( 'wp_date', $date, $format, $timestamp, $timezone );

Here, PHPStan should validate that $date, $format, $timestamp, and $timezone are of the correct types and trigger an error if not. This helps to ensure that the documentation for filters and actions is accurate.

It might be possible to achieve this by treating calls to apply_filters() and do_action() in the same manner as a closure. As far as PHPStan is concerned, this code produces the same result:

/**
 * Filters the date formatted based on the locale.
 *
 * @param string       $date      Formatted date string.
 * @param string       $format    Format to display the date.
 * @param int          $timestamp Unix timestamp.
 * @param DateTimeZone $timezone  Timezone.
 */
$date = function( string $date, string $format, int $timestamp, DateTimeZone $timezone ) : string {
    return $date;
}

closed time in 4 days

johnbillion

PR merged szepeviktor/phpstan-wordpress

Hook docs rule

Implements validation of the @param tags in the optional docblock that precedes a call to apply_filters() or do_action().

Fixes #65 .

+608 -39

7 comments

10 changed files

johnbillion

pr closed time in 4 days

created tagszepeviktor/phpcs-psr-12-neutron-hybrid-ruleset

tagv0.6.1

My useful frankenstein PHPCS ruleset 👓 for OOP WordPress development

created time in 4 days

issue commentszepeviktor/phpcs-psr-12-neutron-hybrid-ruleset

ImportDetection vs. Slvemoat's UseFromSameNamespace

Currently excluding this sniff https://github.com/szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset/commit/9b6f8a08bf5ebc8b70da4d37d4d584b954fc5a41

szepeviktor

comment created time in 4 days

issue openedszepeviktor/phpcs-psr-12-neutron-hybrid-ruleset

ImportDetection vs. Slvemoat's UseFromSameNamespace

Report from @johnbillion

  • ImportDetection.Imports.RequireImports.Symbol
  • SlevomatCodingStandard.Namespaces.UseFromSameNamespace.UseFromSameNamespace

It is ImportDetection's failure: https://github.com/sirbrillig/phpcs-import-detection/issues/45

What to do?

created time in 4 days

pull request commentszepeviktor/phpstan-wordpress

Hook docs rule

In particular all the rules around fully qualified references

I follow a very simple rule in https://github.com/szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset

  1. Import all classes
  2. Except for exceptions and PHPDoc blocks

What would you suggest instead?

johnbillion

comment created time in 4 days

more