Texas judge rules as unconstitutional a law that erodes city regulations in favor of state control