Skip to content

🔴 Wrapping up v4.3.3 (Issues with SqlMap and MySql) #1133

Description

@belisoful

This needs to be fixed before we ship 4.3.3. Given the importance of this class. This is one of the few exceptions to changing this late. Other parts were fixed up in an earlier PR and this is finishing the fix on that bug.

return $namespace;

public static function using($namespace): ?string
	{
		$namespace = static::prado3NamespaceToPhpNamespace($namespace);

		if (isset(self::$_usings[$namespace])) {
			return $namespace . '\\';
		}
		if (class_exists($namespace, false) ||
			interface_exists($namespace, false) ||
			trait_exists($namespace, false)) {
			return $namespace;
		}
	...

needs to be this:

	public static function using($namespace): ?string
	{
		$namespace = static::prado3NamespaceToPhpNamespace($namespace);

		if (isset(self::$_usings[$namespace])) {
			return $namespace . '\\';
		}
		if (class_exists($namespace, false) ||
			interface_exists($namespace, false) ||
			trait_exists($namespace, false)) {
			if (($shortPos = strrpos($namespace, '\\')) !== false) {
				$shortName = substr($namespace, $shortPos + 1);
				if (!class_exists($shortName, false) &&
					!interface_exists($shortName, false) &&
					!trait_exists($shortName, false)) {
					class_alias($namespace, $shortName);
				}
			}
			return $namespace;
		}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions