ernie-research/MEnvBench huggingface dataset:
Repository: barryvdh/laravel-ide-helper (PHP)

Issue:
Default values as enums cases
### Versions:
- ide-helper Version: 2.12.3
- Laravel Version: 10.19.0
- PHP Version: 8.2.8

### Description:

In case we want to add a default value using an enum typed argument on a model query scope like so:

```php
<?php

class MyModel extends Model
{
    public function scopeHasAbility(Builder $query, Authenticatable $user, ?CrudAction $ability = CrudAction::Read)
    {
        // code here...
    }
}
```

This will run fine in PHP 8+ but IDE helper models docblock generator command will complain with the following error:

![image](https://github.com/barryvdh/laravel-ide-helper/assets/2331052/52e1552e-f432-4df3-885e-0f90bb367f20)

Error comes from this line: https://github.com/barryvdh/laravel-ide-helper/blob/0801d002e48d7ead2b0a0169c04f44f72800738a/src/Console/ModelsCommand.php#L1103

### Steps To Reproduce:

- Add code from description
- Run `php artisan ide-helper:models -w`




Fix (patch):
diff --git a/.github/workflows/run-static-analysis.yml b/.github/workflows/run-static-analysis.yml
index 1085dfefe..c8c29bb7a 100644
--- a/.github/workflows/run-static-analysis.yml
+++ b/.github/workflows/run-static-analysis.yml
@@ -17,7 +17,7 @@ jobs:
             - name: Setup PHP
               uses: shivammathur/setup-php@v2
               with:
-                php-version: 8.0
+                php-version: 8.1
                 coverage: none
                 extensions: pdo_sqlite
 
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16fa90442..d638d2df8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
 ### Changed
 - Removed support for Laravel 8 and therefore for PHP < 8.0 [#1504 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1504)
 
+
+### Added
+- Add support for enum default arguments using enum cases. [#1464 / d8vjork](https://github.com/barryvdh/laravel-ide-helper/pull/1464)
+
 2024-02-05, 2.14.0
 ------------------
 
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index f6a5b14dc..84de2231a 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -16,4 +16,9 @@
       <code>\Storage</code>
     </UndefinedClass>
   </file>
+  <file src="src/Console/ModelsCommand.php">
+    <UndefinedClass occurrences="1">
+      <code>\UnitEnum</code>
+    </UndefinedClass>
+  </file>
 </files>
diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php
index c2ce4a674..13735c206 100644
--- a/src/Console/ModelsCommand.php
+++ b/src/Console/ModelsCommand.php
@@ -1099,6 +1099,8 @@ public function getParameters($method)
                     $default = 'null';
                 } elseif (is_int($default)) {
                     //$default = $default;
+                } elseif ($default instanceof \UnitEnum) {
+                    $default = '\\' . get_class($default) . '::' . $default->name;
                 } else {
                     $default = "'" . trim($default) . "'";
                 }
Repository: Automattic/jetpack (PHP)

Issue:
`jetpack release plugins/<plugin> amend -s` doesn't remove -beta from link
### Impacted plugin

None / Other

### Quick summary

Doing a release after running a beta period, should remove `-beta` from the latest github changelog link.

### Steps to reproduce

1. Checkout this branch `boost/branch-3.5.2`;
2. Run `git reset --hard HEAD~2` to go back to before the changelog changes were made;
3. Run `jetpack release plugins/boost amend -s`;
4. Check `projects/plugins/boost/CHANGELOG.md`;
5. The compare link for 3.5.2 should contain `-beta` - `[3.5.2]:
`https://github.com/Automattic/jetpack-boost-production/compare/3.5.1...3.5.2-beta`:

![Image](https://github.com/user-attachments/assets/c2d92524-f219-46bf-8f7d-ab17a439db7f)


### A clear and concise description of what you expected to happen.

When releasing a beta, the compare link shouldn't contain `-beta` at the end.

### Available workarounds?

You can just manually edit the changelog before proceeding with the release.




Fix (patch):
diff --git a/projects/packages/changelogger/changelog/fix-changelogger-amend-default-link b/projects/packages/changelogger/changelog/fix-changelogger-amend-default-link
new file mode 100644
index 0000000000000..09dc0989a5b9c
--- /dev/null
+++ b/projects/packages/changelogger/changelog/fix-changelogger-amend-default-link
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fixed
+
+When amending, do not preserve a default link. We'll want the link to be updated to the new default.
diff --git a/projects/packages/changelogger/src/WriteCommand.php b/projects/packages/changelogger/src/WriteCommand.php
index 900167f64d328..1a23cbdf38090 100644
--- a/projects/packages/changelogger/src/WriteCommand.php
+++ b/projects/packages/changelogger/src/WriteCommand.php
@@ -412,7 +412,11 @@ protected function doAmendChanges( InputInterface $input, OutputInterface $outpu
 					$input->setOption( 'epilogue', $latest->getEpilogue() );
 				}
 				if ( $input->getOption( 'link' ) === null ) {
-					$input->setOption( 'link', $latest->getLink() );
+					$oldLink     = $latest->getLink();
+					$defaultLink = $changelog->getLatestEntry() ? Config::link( $changelog->getLatestEntry()->getVersion(), $latest->getVersion() ) : null;
+					if ( $oldLink !== $defaultLink ) {
+						$input->setOption( 'link', $latest->getLink() );
+					}
 				}
 			} else {
 				$output->writeln( 'No version to amend, ignoring --amend.', OutputInterface::VERBOSITY_DEBUG );
diff --git a/tools/cli/commands/build.js b/tools/cli/commands/build.js
index 41d25232bf875..1e85a759326f9 100644
--- a/tools/cli/commands/build.js
+++ b/tools/cli/commands/build.js
@@ -612,6 +612,15 @@ async function buildProject( t ) {
 				() => false
 			)
 		) {
+			// If we're building changelogger itself, we need to install before we can run it.
+			if ( t.project === 'packages/changelogger' ) {
+				await t.execa( 'composer', await getInstallArgs( t.project, 'composer', t.argv ), {
+					cwd: t.cwd,
+					stdio: [ 'ignore', 'inherit', 'inherit' ],
+					buffer: false,
+				} );
+			}
+
 			let prerelease = 'alpha';
 			if ( composerJson.extra?.[ 'dev-releases' ] ) {
 				const m = (