Oleksii909 / -

Відповідно до тікетів з домену джири весь контент та код скриптів автоматизації з'являється в цьому репозиторії.
https://alefinvest.atlassian.net
0 stars 0 forks source link

#07-2020/11 - Items todo - Notes #1

Open Oleksii909 opened 3 years ago

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago
<?php

namespace Drupal\Component\Utility;

/**
 * Provides helper methods for reflection.
 */
final class Reflection {

  /**
   * Gets the parameter's class name.
   *
   * @param \ReflectionParameter $parameter
   *   The parameter.
   *
   * @return string|null
   *   The parameter's class name or NULL if the parameter is not a class.
   */
  public static function getParameterClassName(\ReflectionParameter $parameter) : ?string {
    $name = NULL;
    if ($parameter->hasType() && !$parameter->getType()->isBuiltin()) {
      $name = $parameter->getType()->getName();
      $lc_name = strtolower($name);
      switch ($lc_name) {
        case 'self':
          return $parameter->getDeclaringClass()->getName();

        case 'parent':
          return ($parent = $parameter->getDeclaringClass()->getParentClass()) ? $parent->name : NULL;
      }
    }
    return $name;
  }

}
Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

Let us know more about type resource in php image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

@andypost Please provide a comment for this commit: image

Oleksii909 commented 3 years ago

@andypost Please provide a comment for this commit: image

<?php
  /**
   * {@inheritdoc}
   */
  public function rollBack($savepoint_name = 'drupal_transaction') {
    // MySQL will automatically commit transactions when tables are altered or
    // created (DDL transactions are not supported). Prevent triggering an
    // exception to ensure that the error that has caused the rollback is
    // properly reported.
    if (!$this->connection->inTransaction()) {
      // On PHP 7 $this->connection->inTransaction() will return TRUE and
      // $this->connection->rollback() does not throw an exception; the
      // following code is unreachable.

      // If \Drupal\Core\Database\Connection::rollBack() would throw an
      // exception then continue to throw an exception.
      if (!$this->inTransaction()) {
        throw new TransactionNoActiveException();
      }
      // A previous rollback to an earlier savepoint may mean that the savepoint
      // in question has already been accidentally committed.
      if (!isset($this->transactionLayers[$savepoint_name])) {
        throw new TransactionNoActiveException();
      }

      trigger_error('Rollback attempted when there is no active transaction. This can cause data integrity issues.', E_USER_WARNING);
      return;
    }
    return parent::rollBack($savepoint_name);
  }

  /**
   * {@inheritdoc}
   */
  protected function doCommit() {
    // MySQL will automatically commit transactions when tables are altered or
    // created (DDL transactions are not supported). Prevent triggering an
    // exception in this case as all statements have been committed.
    if ($this->connection->inTransaction()) {
      // On PHP 7 $this->connection->inTransaction() will return TRUE and
      // $this->connection->commit() does not throw an exception.
      $success = parent::doCommit();
    }
    else {
      // Process the post-root (non-nested) transaction commit callbacks. The
      // following code is copied from
      // \Drupal\Core\Database\Connection::doCommit()
      $success = TRUE;
      if (!empty($this->rootTransactionEndCallbacks)) {
        $callbacks = $this->rootTransactionEndCallbacks;
        $this->rootTransactionEndCallbacks = [];
        foreach ($callbacks as $callback) {
          call_user_func($callback, $success);
        }
      }
    }
    return $success;
  }

@andypost, Thank you for such clear comments in commit. Чи могли б ви прокоментувати цю контрибуцію на живо, тому що доить складно усвідомити цей кусок тесту: image

Oleksii909 commented 3 years ago

Unescaped "@" in ContextProviderInterface doc comment image Issue #3014969 by TR, longwave, Abhijith S, joachim, shimpy

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

image image image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

:"typo3/phar-stream-wrapper": "v3.1.6" image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

Sort direction is not hidden when no sort field is selected image

Oleksii909 commented 3 years ago

image

Oleksii909 commented 3 years ago

Refactor WHY??? Issue #2987980 by alexpott, longwave, Lendude, jibran: Refactor UncaughtExceptionTest to not use cUrl