pester / Pester

Pester is the ubiquitous test and mock framework for PowerShell.
https://pester.dev/
Other
3.11k stars 473 forks source link

Remove code specifically for PS 2.0-5.0 #2510

Open xtqqczze opened 5 months ago

xtqqczze commented 5 months ago
          Should we let this stabilize for a patch or minor release before starting cleanup of PS 3/4 logic and syntax (like `New-Object` -> `::new()`) ?

Originally posted by @fflaten in https://github.com/pester/Pester/issues/2432#issuecomment-2041613517

fflaten commented 5 months ago

Closing as no longer applicable. The PowerShell requirement change was delayed to next major release (v6).

xtqqczze commented 5 months ago

Since v6 development is ongoing on https://github.com/pester/Pester/commit/main, should this issue not remain open?

fflaten commented 5 months ago

We usually close issues on merge. Many parts of the backcompat code are already removed and released in 6.0.0-alpha1.

Please correct me if I misunderstood. 🙂

xtqqczze commented 5 months ago

e.g. https://github.com/pester/Pester/blob/397724dbc4be9d9b93bd0b3d290b02d6d96cade1/tst/functions/Output.Tests.ps1#L681

fflaten commented 5 months ago

Reopen to track future cleanup of PS v2/v3/v4/v5.0 code. Avoid large PRs and changes that doesn't provide a clear benefit.

E.g. changing this which would be unnecessary breaking change for projects migrating to Pester v6 https://github.com/pester/Pester/blob/337c213456a8bccacade49cd1b9fdc4d9bf052a6/src/functions/assertions/HaveParameter.ps1#L277-L291