@composer install --working-dir=tools/php-cs-fixer --no-progress --no-interaction@composer install --working-dir=tools/phpstan --no-progress --no-interaction
The script runs the Composer install command in two separate directories tools/php-cs-fixer
and tools/phpstan
. It's supposed to install PHP Composer packages into these directories without any progress output and without any user interaction. It's considered "safe" as it only performs installation of packages into specific directories. However, the specific package contents are not provided here, so we need to have those packages content to fully ensure safety. The option --no-interaction
implies installation will progress without awaiting user input which is standard for script running.
@composer update --working-dir=tools/php-cs-fixer --no-progress --no-interaction@composer update --working-dir=tools/phpstan --no-progress --no-interaction
This script appears to run a composer update for two PHP tools: PHP-CS-Fixer (a tool for automatically fixing PHP coding standards) and PHPStan (a static analysis tool for PHP). The --working-dir option indicates which directory to run composer in, --no-progress means it won't show the progress bar, and --no-interaction means it won't ask for user input during the process. This does not seem to pose any security risks since it's only updating existing tools without introducing any new external code or trying to manipulate user data.
php-webdriver/webdriver
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
symfony/polyfill-mbstring | v1.29.0 | - | MIT | prod | |
symfony/process | v7.0.7 | - | MIT | prod |
The php-webdriver/webdriver is a PHP language binding for Selenium WebDriver which allows you to control web browsers from PHP. This library is compatible with Selenium server version 2.x, 3.x, and 4.x, supporting both modern W3C WebDriver protocol and the legacy JsonWireProtocol.
To leverage the power of php-webdriver/webdriver, you first need to install it using Composer. If you don't already have Composer, you can download the binary with curl -sS https://getcomposer.org/installer | php
, and then install the library using php composer.phar require php-webdriver/webdriver
. This package was previously named facebook/php-webdriver
. If upgrading from a version prior to 1.8.0, you need to change the name in your composer.json and run composer update
.
Here is a simple usage example:
// Create a Browser Session
// After starting the server (check readme for instructions), specify its URL
$serverUrl = 'http://localhost:4444'; // Change this according to your setup
// Initiate your driver using the server's URL and browser's desired capabilities
use Facebook\WebDriver\Remote\RemoteWebDriver;
$driver = RemoteWebDriver::create($serverUrl, DesiredCapabilities::chrome());
// Control your browser
// Navigate to a webpage
$driver->get('https://www.example.com');
// Perform operations (find elements, fill forms, click buttons, etc.)
$driver->findElement(WebDriverBy::id('searchInput'))->sendKeys('PHP')->submit();
// Always remember to quit the driver at the end
$driver->quit();
Remember, these snippets aren't intended to be a fully working example by simply copy-pasting. Adjust them according to your specific needs.
Comprehensive php-webdriver/webdriver documentation is available directly on their GitHub repository. You can consult the library's wiki for complete instructions on using the library with useful examples and how-tos. If you don't use an IDE, you can refer to the php-webdriver API documentation for an in-depth look at the API. Also, detailed guides on Selenium server setups and browser drivers can be found in the wiki.