Skip to content

Commit

Permalink
minor #32800 Improve some URLs (Arman-Hosseini)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 3.4 branch (closes #32800).

Discussion
----------

Improve some URLs

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

fab17a4487 Improve some URLs
  • Loading branch information
nicolas-grekas committed Aug 8, 2019
2 parents 7bd6fb3 + b8fe606 commit ebe46a4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Expand Up @@ -136,7 +136,7 @@ public function reverseTransform($value)
$dateTime = new \DateTime(sprintf('@%s', $timestamp));
}
// set timezone separately, as it would be ignored if set via the constructor,
// see http://php.net/manual/en/datetime.construct.php
// see https://php.net/datetime.construct
$dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
} catch (\Exception $e) {
throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
Expand Down Expand Up @@ -169,7 +169,7 @@ protected function getIntlDateFormatter($ignoreTimezone = false)

$intlDateFormatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormat, $timeFormat, $timezone, $calendar, $pattern);

// new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323
// new \intlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323
if (!$intlDateFormatter) {
throw new TransformationFailedException(intl_get_error_message(), intl_get_error_code());
}
Expand Down
Expand Up @@ -57,7 +57,7 @@ public function __construct($inputTimezone = null, $outputTimezone = null, $form

$this->generateFormat = $this->parseFormat = $format;

// See http://php.net/manual/en/datetime.createfromformat.php
// See https://php.net/datetime.createfromformat
// The character "|" in the format makes sure that the parts of a date
// that are *not* specified in the format are reset to the corresponding
// values from 1970-01-01 00:00:00 instead of the current time.
Expand Down
2 changes: 1 addition & 1 deletion Extension/Core/Type/BaseType.php
Expand Up @@ -71,7 +71,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)

// Strip leading underscores and digits. These are allowed in
// form names, but not in HTML4 ID attributes.
// http://www.w3.org/TR/html401/struct/global.html#adef-id
// https://www.w3.org/TR/html401/struct/global#adef-id
$id = ltrim($id, '_0123456789');
}

Expand Down
4 changes: 2 additions & 2 deletions Extension/Core/Type/DateType.php
Expand Up @@ -107,13 +107,13 @@ public function buildForm(FormBuilderInterface $builder, array $options)
\Locale::getDefault(),
$dateFormat,
$timeFormat,
// see https://bugs.php.net/bug.php?id=66323
// see https://bugs.php.net/66323
class_exists('IntlTimeZone', false) ? \IntlTimeZone::createDefault() : null,
$calendar,
$pattern
);

// new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/bug.php?id=66323
// new \IntlDateFormatter may return null instead of false in case of failure, see https://bugs.php.net/66323
if (!$formatter) {
throw new InvalidOptionsException(intl_get_error_message(), intl_get_error_code());
}
Expand Down

0 comments on commit ebe46a4

Please sign in to comment.