Skip to content

Releases: minkphp/Mink

1.11.0

09 Dec 11:25
v1.11.0
Compare
Choose a tag to compare

New features:

  • Added support for symfony/css-selector 7
  • Added constants for the supported key modifiers
  • Improved types to help static analysis
  • Added parameter types for most methods

Testsuite:

  • Added CI jobs for PHP 8.2 and 8.3
  • Added static analysis in our CI

1.10.0

28 Mar 14:24
v1.10.0
Compare
Choose a tag to compare

New features:

  • Added support for symfony/css-selector 6
  • Added WebAssert::elementAttributeNotExists

Removed:

  • Removed support for PHP <7.2
  • Removed support for symfony/css-selector <4.4

Bug fixes:

  • Fixed phpdoc for a bunch of arguments that were not properly marked as nullable

1.9.0

11 Oct 12:00
v1.9.0
Compare
Choose a tag to compare

New features:

  • Fixed deprecation warnings on PHP 8.1
  • Improved responsiveness of Element::waitFor
  • Allowed selectors and replacements to be registered late

Removed:

  • Removed support for PHP 5.3

Testsuite:

  • Added CI jobs for PHP 8.0 and 8.1

1.8.1

19 May 16:16
v1.8.1
Compare
Choose a tag to compare

Bug fixes:

  • Fixed the phpdoc of NodeElement::getValue. This method actually returns null in some cases (unchecked checkbox for instance)

1.8.0

19 May 16:15
v1.8.0
Compare
Choose a tag to compare

New features:

  • Auto-start the session on first call to visit. Mink::getSession() will no longer start the session automatically.
  • Added support for symfony/css-selector 4 and 5

Bug fixes:

  • Fixed the message when reporting the deprecation of ExpectationException::getSession()
  • Fixed support for XPath selectors using | inside strings or conditions rather than as a top-level union
  • Fixed compatibility with PHP 7.2 not allowing to use count on strings

Testsuite:

  • Added PHP 7.1, 7.2, 7.3 and 7.4 in the CI
  • Removed HHVM from CI as they stopped supporting PHP compatibility

Driver testsuite:

  • The driver testsuite is no longer part of this package. Use mink/driver-testsuite to run driver tests instead.

Misc:

  • Changed phpdoc types from Boolean to boolean to be compatible with psalm type checking

1.7.1

05 Mar 09:20
Compare
Choose a tag to compare

Bug fixes:

  • Refactored the CssSelector to use the new API of the Symfony CssSelector component to be compatible with Symfony 3

Testsuite:

  • Disallowed failures on PHP 7 on Travis (tests were passing since a long time)

Driver testsuite:

  • Fixed the driver testsuite to account for driver inheritance when checking recommended practices
  • Added a test for cookie values with semicolon, to ensure all drivers support it
  • Improved the window resize test to consider headless browsers
  • Fixed the compatibility of the testsuite with PHPUnit 5
  • Added a test ensuring that wait() always return a boolean even when the JS expression does not cast the value
  • Added HTML escaping of submitted values in the driver testsuite web-fixtures

Misc:

  • Removed the Mink testsuite from archives generated by Github to make them smaller

1.7.0

20 Sep 20:26
Compare
Choose a tag to compare

New features:

  • Added Session::getResponseHeader to access a response header easily
  • Added support for header assertions
  • Added a forward compatibility layer for drivers to allow them to prepare for Mink 2.0 (they won't require any change if they use it). They should now overwrite CoreDriver::findElementXpaths instead of implementing find and setSession themselves.
  • Added escaping of the locator in the NamedSelector rather than expecting the caller to perform the escaping. Passing an escaped locator is still supported but deprecated.
  • Remove the dependency on the Session in expectation exceptions. Passing the session in the exception constructor is now deprecated. The driver should be passed instead.

Bug fixes:

  • Fixed the URL assertions when comparing paths ending in .php
  • Silenced deprecation warnings (following the Symfony convention) to make them less invasive. Use the symfony/phpunit-bridge to get them reported when using Mink in your PHPUnit tests.
  • Fixed NodeElement::hasClass in case the class attribute contains newlines

Testsuite:

  • Made the testsuite compatible with PHPUnit strict timing mode (only the library testsuite, not the driver one)
  • Added testing against PHP 7
  • Added testing against lowest version of dependencies to ensure we got the lower bounds right

Driver testsuite:

  • Added an extra test to ensure the right behavior when getting the HTML with empty elements
  • Added a few more safeguards to ensure test failures rather than fatal errors for misbehaving drivers
  • Added a test ensuring that drivers follow recommended practices

Misc:

  • Added a few missing deprecation warnings for deprecated APIs or classes.

1.6.1

04 Feb 17:04
Compare
Choose a tag to compare

Bug fixes:

  • Added a check for empty path in WebAssert::cleanUrl()

Driver testsuite:

  • Added an extra test to ensure the right behavior for traversal

Misc:

  • Changed the description in the composer.json
  • Switched the repository structure to use PSR-4
  • Updated URLs for the move to the new Github organization

1.6.0

26 Sep 11:00
Compare
Choose a tag to compare

The main focus of this release is ensuring consistency between all driver implementations.

BC breaks

  • The named selector now prefers exact matches over partial matches. Use the named_partial selector if you want to force doing a partial match.
  • NodeElement::getValue for checkboxes now returns the value of the field when checked and null otherwise rather than the checked state (use NodeElement::isChecked for that)
  • Removed the wrapping of any driver-level exception in a MinkException on invalid usage as it was making the code too complex

Deprecations

  • Element::getSession has been deprecated and will be removed in 2.0. Code needing the session should get it from outside rather than from the element.

New features

  • Changed NodeElement::setValue to support any fields rather than only input elements
  • Added Element::getOuterHtml to get the HTML code of the element including itself
  • Added Element::waitFor to allow retrying some code until it succeeds or the timeout is reached
  • Added Element::isValid to check whether an element still exists in the page
  • Added Session::getWindowName and Session::getWindowNames to get the name of the current and of all windows
  • Added Session::maximizeWindow to maximize the window
  • Added NodeElement::isSelected to check whether an <option> is selected
  • Added NodeElement::submitForm to allow submitting a form without using a button
  • Added assertions about the value of an attribute
  • Changed Session::wait to return the condition value rather than nothing
  • Added the anchor in the assertion on the URL in WebAssert
  • Introduced Behat\Mink\Selector\Xpath\Escaper to allow reusing the XPath escaping. When building your own XPath, using it is prefered over accessing the SelectorsHandler for forward-compatibility with 2.0 (using the SelectorsHandler to escape the locator passed to the named selector is fine as this escaping will need to be removed in 2.0)

Removal

  • Removed hasClass from DocumentElement (instead of triggering a fatal error when it is used)

Bug fixes

  • Fixed the XPath prefixing when searching inside an existing element
  • Fixed the matching of the input type in the named selector to be case insensitive according to the HTML spec
  • Fixed the name selectors to match on the placeholder only for textual inputs
  • Fixed NodeElement::getTagName to ensure that the tag name is lowercase for all drivers
  • Fixed Element::hasAttribute to ensure it supports attributes with an empty value
  • Fixed the field selector to avoid matching inputs with the type submit or reset
  • Changed the button XPath selection to accept reset buttons as well
  • Enforced consistent behavior for drivers on 4xx and 5xx response to return the response rather than throwing an exception
  • Made Session::executeScript compatible across drivers by ensuring they all support the same syntaxes for the JS expression
  • Made Session::evaluateScript compatible across drivers by ensuring they all support the same syntaxes for the JS expression
  • Changed ElementNotFoundException to extend from ExpectationException

Testsuite

  • Refactored the driver testsuite entirely and expand it to cover drivers entirely (covering many more cases to ensure consistency)
  • Added testing on HHVM