Skip to content

Bump nette/php-generator from 4.1.8 to 4.2.2 in /backend - #1092

Closed
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/composer/backend/nette/php-generator-4.2.2
Closed

dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/composer/backend/nette/php-generator-4.2.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Mar 16, 2026

Copy link
Copy Markdown
Contributor

Bumps nette/php-generator from 4.1.8 to 4.2.2.

Release notes

Sourced from nette/php-generator's releases.

Released version 4.2.2

This release focuses on making namespaces and classes work together more naturally. Classes now know which namespace they belong to, constructors accept fully qualified names, and a new unified add() method on PhpFile ties it all together. Under the hood, the Factory got a thorough refactoring and the codebase passed its first mandatory static analysis check.

  • PhpNamespace::add() now automatically assigns itself as the namespace of any ClassLike passed to it. If your code relied on getNamespace() returning null after adding a class to a namespace, you'll need to update that assumption.

  • PhpFile::add() – a single entry point for adding classes, interfaces, traits, enums, functions, and namespaces to a file. It handles namespace creation and bracket syntax automatically, so you can build a complete file with just add() calls.

  • ClassLike::getFullName() – returns the fully qualified name when the class belongs to a namespace (e.g., App\Model\User), the short name otherwise, or null for anonymous classes.

  • ClassLike constructors now accept FQN – pass 'App\Model\User' and the namespace is extracted automatically. No need to create the namespace separately for simple cases.

  • PhpNamespace::add() accepts GlobalFunction – the unified add() method now handles functions alongside class-like types, making the namespace API more consistent.

  • The $namespace parameter in ClassLike constructors is deprecated. Use setNamespace() instead. The old signature still works for now, but will be removed in a future version.

Released version 4.2.0

  • requires PHP 8.1
  • Visibility, PropertyHookType & PropertyAccessMode are enums (BC break)
  • removed deprecated stuff
  • addTrait() second argument is deprecated (BC break)

Released version 4.1.9

  • support for PHP 8.5
  • final promoted property in PHP 8.5
  • optimized global function calls
Commits
  • 0d70609 made static analysis mandatory
  • a2181b0 fixed PHPStan errors
  • e7d0fda uses nette/phpstan-rules
  • 8ab2202 improved phpDoc types
  • 27a950f PhpNamespace::add() passes self to ClassLike (BC break)
  • a666b17 Factory::getAttributes() refactoring to formatAttributes()
  • 1bb8070 Factory::fromClassReflection() refactoring
  • 4d91d21 added PhpFile::add()
  • c16e5ef PhpNamespace::add() accepts GlobalFunction
  • ca0486c added ClassLike::getFullName()
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [nette/php-generator](https://github.com/nette/php-generator) from 4.1.8 to 4.2.2.
- [Release notes](https://github.com/nette/php-generator/releases)
- [Commits](nette/php-generator@v4.1.8...v4.2.2)

---
updated-dependencies:
- dependency-name: nette/php-generator
  dependency-version: 4.2.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file php Pull requests that update php code labels Mar 16, 2026
@daveearley daveearley closed this Sep 15, 2026
@dependabot @github

dependabot Bot commented on behalf of github Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 15, 2026
@dependabot
dependabot Bot deleted the dependabot/composer/backend/nette/php-generator-4.2.2 branch September 15, 2026 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant